Skip to content

Commit 64ac602

Browse files
committed
Merge branch 'devel' into main
2 parents d83b02e + 7ab9773 commit 64ac602

File tree

14 files changed

+55
-29
lines changed

14 files changed

+55
-29
lines changed

.github/CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ There are a couple of rules, which are definitely not standard, but highly recom
6464

6565
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.
6666
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.
67-
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`).
67+
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`).
6868
4. Add failing tests for the change you want to make. Tests are crucial and should be taken from W3C (or other specification).
6969
5. Fix stuff. Always go from edge case to edge case.
7070
6. All tests should pass now. Also your new implementation should not break existing tests.
@@ -73,7 +73,7 @@ There are a couple of rules, which are definitely not standard, but highly recom
7373

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

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

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

@@ -101,7 +101,7 @@ git push
101101
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`.
102102

103103
```sh
104-
git checkout master
104+
git checkout main
105105
git merge devel
106106
git tag v1.0
107107
```
@@ -128,7 +128,7 @@ To sync manually:
128128

129129
```sh
130130
git remote add gitbase git@github.com:AngleSharp/AngleSharp.GitBase.git
131-
git pull gitbase master
131+
git pull gitbase main
132132
```
133133

134134
### Versioning

.github/workflows/ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ jobs:
4949

5050
steps:
5151
- uses: actions/checkout@v2
52+
53+
- uses: actions/setup-dotnet@v1
54+
with:
55+
dotnet-version: |
56+
3.1.x
57+
5.0.x
58+
6.0.x
5259
5360
- name: Build
5461
run: ./build.sh
@@ -58,6 +65,13 @@ jobs:
5865

5966
steps:
6067
- uses: actions/checkout@v2
68+
69+
- uses: actions/setup-dotnet@v1
70+
with:
71+
dotnet-version: |
72+
3.1.x
73+
5.0.x
74+
6.0.x
6175
6276
- name: Build
6377
run: |

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 0.17.0
2+
3+
Released on Tuesday, May 31 2022.
4+
5+
- Updated to use AngleSharp 0.17
6+
- Dropped .NET Framework 4.6
7+
- Fixed parser ignoring IsKeepingSourceReferences (#16)
8+
19
# 0.16.0
210

311
Released on Sunday, June 13 2021.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013 - 2021 AngleSharp
3+
Copyright (c) 2013 - 2022 AngleSharp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![logo](https://raw.githubusercontent.com/AngleSharp/AngleSharp.Xml/master/header.png)
1+
![logo](https://raw.githubusercontent.com/AngleSharp/AngleSharp.Xml/main/header.png)
22

33
# AngleSharp.Xml
44

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

7575
The MIT License (MIT)
7676

77-
Copyright (c) 2020 AngleSharp
77+
Copyright (c) 2020 - 2022 AngleSharp
7878

7979
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:
8080

build.cake

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ var projectName = "AngleSharp.Xml";
33
var solutionName = "AngleSharp.Xml";
44
var frameworks = new Dictionary<String, String>
55
{
6-
{ "net46", "net46" },
76
{ "net461", "net461" },
87
{ "net472", "net472" },
98
{ "netstandard2.0", "netstandard2.0" },

src/AngleSharp.Xml.Docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@anglesharp/xml",
3-
"version": "0.16.0",
3+
"version": "0.17.0",
44
"preview": true,
55
"description": "The doclet for the AngleSharp.Xml documentation.",
66
"keywords": [
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
3+
<TargetFrameworks>net6.0</TargetFrameworks>
44
<SignAssembly>true</SignAssembly>
55
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
66
<IsPackable>false</IsPackable>
@@ -15,11 +15,11 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="GitHubActionsTestLogger" Version="1.2.0" />
19-
<PackageReference Include="AngleSharp" Version="0.16.0" />
18+
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.0" PrivateAssets="all" />
19+
<PackageReference Include="AngleSharp" Version="0.17.0" />
2020
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
21-
<PackageReference Include="NUnit" Version="3.13.1" />
22-
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
23-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
21+
<PackageReference Include="NUnit" Version="3.13.2" />
22+
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
23+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
2424
</ItemGroup>
25-
</Project>
25+
</Project>

src/AngleSharp.Xml.nuspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
<icon>logo.png</icon>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1212
<description>Adds a powerful XML and DTD parser to AngleSharp.</description>
13-
<releaseNotes>https://github.com/AngleSharp/AngleSharp.Xml/blob/master/CHANGELOG.md</releaseNotes>
14-
<copyright>Copyright 2016-2021, AngleSharp</copyright>
13+
<releaseNotes>https://github.com/AngleSharp/AngleSharp.Xml/blob/main/CHANGELOG.md</releaseNotes>
14+
<copyright>Copyright 2016-2022, AngleSharp</copyright>
1515
<tags>html html5 css css3 dom requester http https xml dtd</tags>
1616
<dependencies>
17-
<dependency id="AngleSharp" version="0.16.0" />
17+
<dependency id="AngleSharp" version="0.17.0" />
1818
</dependencies>
1919
</metadata>
2020
</package>

src/AngleSharp.Xml/AngleSharp.Xml.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<AssemblyName>AngleSharp.Xml</AssemblyName>
44
<RootNamespace>AngleSharp.Xml</RootNamespace>
55
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
6-
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;net46;net461;net472</TargetFrameworks>
6+
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;net461;net472</TargetFrameworks>
77
<SignAssembly>true</SignAssembly>
88
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -21,7 +21,7 @@
2121
</ItemGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="AngleSharp" Version="0.16.0" />
24+
<PackageReference Include="AngleSharp" Version="0.17.0" />
2525
</ItemGroup>
2626

2727
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">

src/AngleSharp.Xml/Parser/Tokens/XmlTagToken.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
namespace AngleSharp.Xml.Parser.Tokens
22
{
3+
using AngleSharp.Dom;
34
using AngleSharp.Text;
45
using System;
56
using System.Collections.Generic;
67

78
/// <summary>
89
/// Class for StartTagToken and EndTagToken.
910
/// </summary>
10-
sealed class XmlTagToken : XmlToken
11+
sealed class XmlTagToken : XmlToken, ISourceReference
1112
{
1213
#region Fields
13-
14+
1415
private readonly List<KeyValuePair<String, String>> _attributes;
1516
private String _name;
1617
private Boolean _selfClosing;

src/AngleSharp.Xml/Parser/XmlDomBuilder.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public Node CurrentNode
6363
{
6464
return _openElements[_openElements.Count - 1];
6565
}
66-
66+
6767
return _document;
6868
}
6969
}
@@ -290,6 +290,11 @@ private void InBody(XmlToken token)
290290
_currentMode = XmlTreeMode.After;
291291
}
292292

293+
if (_options.IsKeepingSourceReferences)
294+
{
295+
element.SourceReference = tagToken;
296+
}
297+
293298
if (_options.OnCreated != null)
294299
{
295300
_options.OnCreated.Invoke(element, tagToken.Position);
@@ -430,7 +435,7 @@ private Attr CreateAttribute(String name, String value)
430435
{
431436
ns = CurrentNode.LookupNamespaceUri(prefix);
432437
}
433-
438+
434439
return new Attr(prefix, name.Substring(colon + 1), value, ns);
435440
}
436441

src/Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<PropertyGroup>
33
<Description>Adds a powerful XML and DTD parser to AngleSharp.</Description>
44
<Product>AngleSharp.Xml</Product>
5-
<Version>0.16.0</Version>
5+
<Version>0.17.0</Version>
66
</PropertyGroup>
77
</Project>

tools/anglesharp.cake

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#addin "Cake.FileHelpers"
2-
#addin "Octokit"
1+
#addin nuget:?package=Cake.FileHelpers&version=3.2.0
2+
#addin nuget:?package=Octokit&version=0.32.0
33
using Octokit;
44

55
var configuration = Argument("configuration", "Release");
@@ -28,7 +28,6 @@ if (isRunningOnGitHubActions)
2828

2929
if (!isRunningOnWindows)
3030
{
31-
frameworks.Remove("net46");
3231
frameworks.Remove("net461");
3332
frameworks.Remove("net472");
3433
}

0 commit comments

Comments
 (0)