Don't tag/publish PR builds

Fix XML documentation bugs
This commit is contained in:
Michael Ganss
2018-09-21 16:08:48 +02:00
parent 82d8ca44aa
commit 18d1da8b19
5 changed files with 42 additions and 15 deletions

View File

@@ -4,10 +4,8 @@ image: Visual Studio 2017
environment:
access_token:
secure: Eq6BjtZ80BXKLwFMg76IjuQAvbLjbojIF/X/ARouGVhxPneJtgDfCXMPNgJ7KBKq
CoverityProjectToken:
secure: pUUrynbyxCRpsAgGdKBVYDZCilwBmaWQ1Jg+rg5znr0=
CoverityNotificationEmail:
secure: m/ox72HU97EeJExWEFWx+0M9uov0cydn6E8mSaQzsQE=
nuget:
disable_publish_on_pr: true
build_script:
- ps: (Get-Content src\HtmlSanitizer\HtmlSanitizer.csproj).Replace("1.0.0-VERSION", $env:APPVEYOR_BUILD_VERSION) | Set-Content src\HtmlSanitizer\HtmlSanitizer.csproj
- dotnet restore
@@ -21,9 +19,12 @@ test_script:
artifacts:
- path: 'src\**\*.nupkg'
on_success:
- git config --global credential.helper store
- ps: Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
- git config --global user.email "michael@ganss.org"
- git config --global user.name "Michael Ganss"
- git tag v%APPVEYOR_BUILD_VERSION%
- git push origin --tags
- ps: |
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
git config --global credential.helper store
Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
git config --global user.email "michael@ganss.org"
git config --global user.name "Michael Ganss"
git tag v$env:APPVEYOR_BUILD_VERSION
git push origin --tags --porcelain
}

View File

@@ -398,7 +398,7 @@ namespace Ganss.XSS
/// <summary>
/// Raises the <see cref="E:RemovingCSSClass" /> event.
/// </summary>
/// <param name="e">The <see cref="RemovingCSSClass"/> instance containing the event data.</param>
/// <param name="e">The <see cref="RemovingCssClassEventArgs"/> instance containing the event data.</param>
protected virtual void OnRemovingCssClass(RemovingCssClassEventArgs e)
{
RemovingCssClass?.Invoke(this, e);
@@ -916,8 +916,8 @@ namespace Ganss.XSS
/// Removes a CSS class from a class attribute.
/// </summary>
/// <param name="tag">Tag the style belongs to</param>
/// <param name="rule">Rule to be removed</param>
/// <returns>true, if the rule can be removed; false, otherwise.</returns>
/// <param name="cssClass">Class to be removed</param>
/// <param name="reason">Reason for removal</param>
private void RemoveCssClass(IElement tag, string cssClass, RemoveReason reason)
{
var e = new RemovingCssClassEventArgs { Tag = tag, CssClass = cssClass, Reason = reason };

View File

@@ -22,6 +22,8 @@
<AppConfig Condition="'$(TargetFramework)' == 'net40'">app.net40.config</AppConfig>
<AutoUnifyAssemblyReferences Condition="'$(TargetFramework)' == 'net40'">false</AutoUnifyAssemblyReferences>
<RootNamespace>Ganss.XSS</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\HtmlSanitizer.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>

View File

@@ -15,7 +15,7 @@ namespace Ganss.XSS
public interface IHtmlSanitizer
{
/// <summary>
/// Gets or sets a value indicating whether to keep child nodes of elements that are removed. Default is <see cref="DefaultKeepChildNodes"/>.
/// Gets or sets a value indicating whether to keep child nodes of elements that are removed.
/// </summary>
bool KeepChildNodes { get; set; }
@@ -25,7 +25,7 @@ namespace Ganss.XSS
Func<HtmlParser> HtmlParserFactory { get; set; }
/// <summary>
/// Gets or sets the <see cref="IMarkupFormatter"/> object used for generating output. Default is <see cref="DefaultOutputFormatter"/>.
/// Gets or sets the <see cref="IMarkupFormatter"/> object used for generating output.
/// </summary>
IMarkupFormatter OutputFormatter { get; set; }
@@ -90,6 +90,7 @@ namespace Ganss.XSS
/// </value>
Regex DisallowCssPropertyValue { get; set; }
/// <summary>
/// Gets or sets the allowed CSS classes.
/// </summary>
/// <value>

View File

@@ -5,10 +5,33 @@ using System.Text;
namespace Ganss.XSS
{
/// <summary>
/// Represents an Internationalized Resource Identifier
/// </summary>
public class Iri
{
/// <summary>
/// Gets or sets the value of the IRI.
/// </summary>
/// <value>
/// The value of the IRI.
/// </value>
public string Value { get; set; }
/// <summary>
/// Gets a value indicating whether the IRI is absolute.
/// </summary>
/// <value>
/// <c>true</c> if the IRI is absolute; otherwise, <c>false</c>.
/// </value>
public bool IsAbsolute => !string.IsNullOrEmpty(Scheme);
/// <summary>
/// Gets or sets the scheme of the IRI, e.g. http.
/// </summary>
/// <value>
/// The scheme of the IRI.
/// </value>
public string Scheme { get; set; }
}
}