Skip to content

Commit

Permalink
Merge branch 'devel' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed May 31, 2022
2 parents d83b02e + 7ab9773 commit 64ac602
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ There are a couple of rules, which are definitely not standard, but highly recom

1. If no issue already exists for the work you'll be doing, create one to document the problem(s) being solved and self-assign.
2. Otherwise please let us know that you are working on the problem. Regular status updates (e.g. "still in progress", "no time anymore", "practically done", "pull request issued") are highly welcome.
3. Create a new branch—please don't work in the `master` branch directly. It is reserved for releases. We recommend naming the branch to match the issue being addressed (`feature/#777` or `issue-777`).
3. Create a new branch—please don't work in the `main` branch directly. It is reserved for releases. We recommend naming the branch to match the issue being addressed (`feature/#777` or `issue-777`).
4. Add failing tests for the change you want to make. Tests are crucial and should be taken from W3C (or other specification).
5. Fix stuff. Always go from edge case to edge case.
6. All tests should pass now. Also your new implementation should not break existing tests.
Expand All @@ -73,7 +73,7 @@ There are a couple of rules, which are definitely not standard, but highly recom

Just to illustrate the git workflow for AngleSharp a little bit more we've added the following graphs.

Initially, AngleSharp starts at the `master` branch. This branch should contain the latest stable (or released) version.
Initially, AngleSharp starts at the `main` branch. This branch should contain the latest stable (or released) version.

Here we now created a new branch called `devel`. This is the development branch.

Expand Down Expand Up @@ -101,7 +101,7 @@ git push
Finally, we may have all the features that are needed to release a new version of AngleSharp. Here we tag the release. For instance for the 1.0 release we use `v1.0`.

```sh
git checkout master
git checkout main
git merge devel
git tag v1.0
```
Expand All @@ -128,7 +128,7 @@ To sync manually:

```sh
git remote add gitbase [email protected]:AngleSharp/AngleSharp.GitBase.git
git pull gitbase master
git pull gitbase main
```

### Versioning
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ jobs:

steps:
- uses: actions/checkout@v2

- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- name: Build
run: ./build.sh
Expand All @@ -58,6 +65,13 @@ jobs:

steps:
- uses: actions/checkout@v2

- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- name: Build
run: |
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 0.17.0

Released on Tuesday, May 31 2022.

- Updated to use AngleSharp 0.17
- Dropped .NET Framework 4.6
- Fixed parser ignoring IsKeepingSourceReferences (#16)

# 0.16.0

Released on Sunday, June 13 2021.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013 - 2021 AngleSharp
Copyright (c) 2013 - 2022 AngleSharp

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![logo](https://raw.githubusercontent.com/AngleSharp/AngleSharp.Xml/master/header.png)
![logo](https://raw.githubusercontent.com/AngleSharp/AngleSharp.Xml/main/header.png)

# AngleSharp.Xml

Expand Down Expand Up @@ -74,7 +74,7 @@ This project is supported by the [.NET Foundation](https://dotnetfoundation.org)

The MIT License (MIT)

Copyright (c) 2020 AngleSharp
Copyright (c) 2020 - 2022 AngleSharp

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
1 change: 0 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var projectName = "AngleSharp.Xml";
var solutionName = "AngleSharp.Xml";
var frameworks = new Dictionary<String, String>
{
{ "net46", "net46" },
{ "net461", "net461" },
{ "net472", "net472" },
{ "netstandard2.0", "netstandard2.0" },
Expand Down
2 changes: 1 addition & 1 deletion src/AngleSharp.Xml.Docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anglesharp/xml",
"version": "0.16.0",
"version": "0.17.0",
"preview": true,
"description": "The doclet for the AngleSharp.Xml documentation.",
"keywords": [
Expand Down
14 changes: 7 additions & 7 deletions src/AngleSharp.Xml.Tests/AngleSharp.Xml.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
<IsPackable>false</IsPackable>
Expand All @@ -15,11 +15,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="1.2.0" />
<PackageReference Include="AngleSharp" Version="0.16.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.0" PrivateAssets="all" />
<PackageReference Include="AngleSharp" Version="0.17.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NUnit" Version="3.13.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
</ItemGroup>
</Project>
</Project>
6 changes: 3 additions & 3 deletions src/AngleSharp.Xml.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<icon>logo.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Adds a powerful XML and DTD parser to AngleSharp.</description>
<releaseNotes>https://github.com/AngleSharp/AngleSharp.Xml/blob/master/CHANGELOG.md</releaseNotes>
<copyright>Copyright 2016-2021, AngleSharp</copyright>
<releaseNotes>https://github.com/AngleSharp/AngleSharp.Xml/blob/main/CHANGELOG.md</releaseNotes>
<copyright>Copyright 2016-2022, AngleSharp</copyright>
<tags>html html5 css css3 dom requester http https xml dtd</tags>
<dependencies>
<dependency id="AngleSharp" version="0.16.0" />
<dependency id="AngleSharp" version="0.17.0" />
</dependencies>
</metadata>
</package>
4 changes: 2 additions & 2 deletions src/AngleSharp.Xml/AngleSharp.Xml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AssemblyName>AngleSharp.Xml</AssemblyName>
<RootNamespace>AngleSharp.Xml</RootNamespace>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;net46;net461;net472</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;net461;net472</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -21,7 +21,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.16.0" />
<PackageReference Include="AngleSharp" Version="0.17.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
Expand Down
5 changes: 3 additions & 2 deletions src/AngleSharp.Xml/Parser/Tokens/XmlTagToken.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
namespace AngleSharp.Xml.Parser.Tokens
{
using AngleSharp.Dom;
using AngleSharp.Text;
using System;
using System.Collections.Generic;

/// <summary>
/// Class for StartTagToken and EndTagToken.
/// </summary>
sealed class XmlTagToken : XmlToken
sealed class XmlTagToken : XmlToken, ISourceReference
{
#region Fields

private readonly List<KeyValuePair<String, String>> _attributes;
private String _name;
private Boolean _selfClosing;
Expand Down
9 changes: 7 additions & 2 deletions src/AngleSharp.Xml/Parser/XmlDomBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Node CurrentNode
{
return _openElements[_openElements.Count - 1];
}

return _document;
}
}
Expand Down Expand Up @@ -290,6 +290,11 @@ private void InBody(XmlToken token)
_currentMode = XmlTreeMode.After;
}

if (_options.IsKeepingSourceReferences)
{
element.SourceReference = tagToken;
}

if (_options.OnCreated != null)
{
_options.OnCreated.Invoke(element, tagToken.Position);
Expand Down Expand Up @@ -430,7 +435,7 @@ private Attr CreateAttribute(String name, String value)
{
ns = CurrentNode.LookupNamespaceUri(prefix);
}

return new Attr(prefix, name.Substring(colon + 1), value, ns);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<PropertyGroup>
<Description>Adds a powerful XML and DTD parser to AngleSharp.</Description>
<Product>AngleSharp.Xml</Product>
<Version>0.16.0</Version>
<Version>0.17.0</Version>
</PropertyGroup>
</Project>
5 changes: 2 additions & 3 deletions tools/anglesharp.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#addin "Cake.FileHelpers"
#addin "Octokit"
#addin nuget:?package=Cake.FileHelpers&version=3.2.0
#addin nuget:?package=Octokit&version=0.32.0
using Octokit;

var configuration = Argument("configuration", "Release");
Expand Down Expand Up @@ -28,7 +28,6 @@ if (isRunningOnGitHubActions)

if (!isRunningOnWindows)
{
frameworks.Remove("net46");
frameworks.Remove("net461");
frameworks.Remove("net472");
}
Expand Down

0 comments on commit 64ac602

Please sign in to comment.