Skip to content

Commit

Permalink
Merge pull request #450 from baynezy/release/6.2.5.7
Browse files Browse the repository at this point in the history
Release version 6.2.5.7
  • Loading branch information
baynezy authored Aug 7, 2024
2 parents a7f5537 + 278d32c commit 8d0806a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ jobs:
runs-on: ubuntu-latest
environment: github-pages
steps:
- uses: DenverCoder1/doxygen-github-pages-action@v1.3.0
- uses: baynezy/doxygen-github-pages-action@feature/specific-version
with:
github_token: ${{ secrets.PUBLISH_DOCS_TOKEN }}
branch: gh-pages
config_file: doxygen.config
config_file: doxygen.config
doxygen_version: 1.9.6
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.2.5.7] - 2024-08-07

### Fixed

- Fixed issue where empty HTML lists would cause a `System.InvalidOperationException`

## [6.2.4.6] - 2024-08-02

### Added
Expand Down Expand Up @@ -470,7 +476,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.0.1] - 2013-07-04

[unreleased]: https://github.com/baynezy/Html2Markdown/compare/6.2.4.6...HEAD
[unreleased]: https://github.com/baynezy/Html2Markdown/compare/6.2.5.7...HEAD
[6.2.5.7]: https://github.com/baynezy/Html2Markdown/compare/6.2.4.6...6.2.5.7
[6.2.4.6]: https://github.com/baynezy/Html2Markdown/compare/6.2.3.6...6.2.4.6
[6.2.3.6]: https://github.com/baynezy/Html2Markdown/compare/6.2.2.5...6.2.3.6
[6.2.2.5]: https://github.com/baynezy/Html2Markdown/compare/6.2.1.4...6.2.2.5
Expand Down
2 changes: 1 addition & 1 deletion semver.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"major":"6","minor":"2","patch":"4","build":"6"}
{"major":"6","minor":"2","patch":"5","build":"7"}
2 changes: 2 additions & 0 deletions src/Html2Markdown/Replacement/HtmlParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ private static string ReplaceList(string html)
}
markdownList.Add($"{listPrefix}{finalList}");
});

if (markdownList.Count == 0) return string.Empty;

//If a new line is already ending the markdown item, then we don't need to add another one
return Environment.NewLine + Environment.NewLine + markdownList.Aggregate((current, item) => current.EndsWith(Environment.NewLine) ? current + item : current + Environment.NewLine + item) + Environment.NewLine + Environment.NewLine;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
emptyString
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
emptyString
9 changes: 9 additions & 0 deletions test/Html2Markdown.Test/MarkdownSchemeConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,15 @@ public Task Convert_WhenThereAreMultipleUnorderedLists_ThenReplaceWithMarkdownLi

return CheckConversion(html);
}

// See issue https://github.com/baynezy/Html2Markdown/issues/109
[Test]
public Task Convert_WhenThereIsAnEmptyList_ThenRemoveTheList()
{
const string html = "<ul><li></li></ul>";

return CheckConversion(html);
}

#endregion

Expand Down

0 comments on commit 8d0806a

Please sign in to comment.