Skip to content

Commit c67f117

Browse files
committed
Updated release notes format
1 parent 9746edb commit c67f117

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

Changelog.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# 23.6.2
22

3-
ElectronNET.API:
3+
## ElectronNET.API
44

5-
* Fixed escaping of URL #735 @cosmo0
6-
* Changed `ZoomFactor` type #754 @Yuvix25
5+
* Fixed escaping of URL (#735) @cosmo0
6+
* Changed `ZoomFactor` type from `int` to `double` (#754) @Yuvix25
77

8-
ElectronNET.CLI:
8+
## ElectronNET.CLI
99

1010
* (none)
1111

12-
Infrastructure:
12+
## Infrastructure
1313

1414
* Changed build system to NUKE #757 @FlorianRappl
1515
* Updated target framework for host project #753 @r-pankevicius
1616

1717
# 23.6.1
1818

19-
ElectronNET.CLI:
19+
## ElectronNET.CLI
2020

2121
* New Feature: Upgrade to .NET 6 support
2222

23-
ElectronNET.API:
23+
## ElectronNET.API
2424

2525
* New Feature: Native Electron 23.2.0 support, but not all new API features included (we search contributors)
2626
* New Feature: Upgrade to .NET 6 support

nuke/ReleaseNotesParser.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ private IReadOnlyList<ReleaseNotes> ParseComplexFormat(string[] lines)
8585

8686
// Parse content.
8787
var notes = new List<string>();
88+
8889
while (true)
8990
{
9091
// Sanity checks.
@@ -93,13 +94,14 @@ private IReadOnlyList<ReleaseNotes> ParseComplexFormat(string[] lines)
9394
break;
9495
}
9596

96-
if (lines[lineIndex].StartsWith("#", StringComparison.OrdinalIgnoreCase))
97+
if (lines[lineIndex].StartsWith("# ", StringComparison.OrdinalIgnoreCase))
9798
{
9899
break;
99100
}
100101

101102
// Get the current line.
102-
var line = (lines[lineIndex] ?? string.Empty).Trim('*').Trim();
103+
var line = (lines[lineIndex] ?? string.Empty).Trim();
104+
103105
if (!string.IsNullOrWhiteSpace(line))
104106
{
105107
notes.Add(line);
@@ -127,7 +129,8 @@ private IReadOnlyList<ReleaseNotes> ParseSimpleFormat(string[] lines)
127129
}
128130

129131
// Trim the current line.
130-
var line = (lines[lineIndex] ?? string.Empty).Trim('*', ' ');
132+
var line = (lines[lineIndex] ?? string.Empty);
133+
131134
if (string.IsNullOrWhiteSpace(line))
132135
{
133136
lineIndex++;
@@ -137,6 +140,7 @@ private IReadOnlyList<ReleaseNotes> ParseSimpleFormat(string[] lines)
137140
// Parse header.
138141
var semVer = SemVersion.Zero;
139142
var version = SemVersion.TryParse(lines[lineIndex], out semVer);
143+
140144
if (!version)
141145
{
142146
throw new BuildAbortedException("Could not parse version from release notes header.");

0 commit comments

Comments
 (0)