Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 1, 2025

Bumps comrak from 0.43.0 to 0.48.0.

Release notes

Sourced from comrak's releases.

v0.48.0

The breaking changes are listed right at the top! Please note that AST content now represents NUL bytes (codepoint number zero) as they were in the input; these used to be translated to the lovely � character at the very beginning of the input process, presumably so the rest of the reference C parser didn't have to deal with the possibility of strings containing NUL bytes. We can do better, though, so let's! The � character is now emitted by our formatters in place of NUL, but if you use custom or manual formatters and emit any part of the AST content directly (without using comrak::html::escape, context::html::escape_href, or the same-named functions on Context), you may need to do the same translation yourself.

We also no longer append a newline to the end of the file where there wasn't one originally, which meant a lot of places in the parser had to adapt to their strings not necessarily containing a newline before they ended. Careful review and extensive fuzzing should have squeaked out any unexpected overruns, but consider my eyes peeled for reports regarding this. (Ew.) We've cleaned up some sourcepos calculation which depended on this behaviour in odd ways, but there may yet be more to discover which our test suite didn't catch.

Did you know November is Trans Month? I didn't! I'm guessing it's because Trans Awareness Week falls within it, and we've been having a pretty bad time of it rights-wise around the world lately!

Happy Trans Month, and if you happen to typo it as Trans Moth, we can be happy about that too! 🏳️‍⚧️ ᖭི༏ᖫྀ

Parser changes:

  • No longer translate NUL bytes into U+FFFD REPLACEMENT CHARACTER in the parse stage; do it in formatters instead. (by @​kivikakk in kivikakk/comrak#681)
    • This means the AST now contains NUL bytes where they were present in input, preserving the difference between NUL and literally-entered characters.
  • No longer append a virtual newline at the end of the file where missing. (by @​kivikakk in kivikakk/comrak#682)
    • The spec allows a line to end with either a newline or EOF; the reference parser would assume any given input string will always have a terminating linefeed and forced that to be the case, and so Comrak used to. Comrak no longer does.
    • We also now handle line feed, carriage return, and carriage return plus line feed (as allow'd by the spec) without pretending they're all just a line feed, meaning e.g. sourcepos for softbreaks now correctly spans two bytes when it was produced by a carriage return plus line feed.

Changed APIs:

  • Remove mandatory space before fenced codeblock info string in CommonMark output. (by @​kivikakk in kivikakk/comrak#686)
  • Write out %25 in hrefs where not part of a percent-encode sequence. (by @​kivikakk in kivikakk/comrak#687)
    • We used to leave any % character alone, such that [link](https://github.com/kivikakk/comrak/blob/HEAD/%%20) would roundtrip without change. It now roundtrips to [link](https://github.com/kivikakk/comrak/blob/HEAD/%25%20).
  • Relaxed tasklist matching now supports a full Unicode scalar for the character between the […], and no longer turns single-byte UTF-8 characters into the Unicode codepoint numbered at the UTF-8 byte (!). (by @​kivikakk in kivikakk/comrak#689)

New APIs:

Bug fixes:

Performance:

  • Simplify internal feed function, no longer requiring any allocation before the block parser. (by @​kivikakk in kivikakk/comrak#679, kivikakk/comrak#681)
    • This is possible due to not translating NUL and not appending a virtual EOF newline; compare before and after.
  • Don't buffer CommonMark output unless necessary. (by @​kivikakk in kivikakk/comrak#684)
    • The full output was always buffered in a string before being written to the destination, which in many cases is going to be another string. Buffering is now done only to the extent required by output options, which often will be "not at all."
  • Use SIMD for core line feed process. (by @​kivikakk in kivikakk/comrak#688)

Build changes:

... (truncated)

Changelog

Sourced from comrak's changelog.

[v0.48.0] - 2025-11-13

The breaking changes are listed right at the top! Please note that AST content now represents NUL bytes (codepoint number zero) as they were in the input; these used to be translated to the lovely � character at the very beginning of the input process, presumably so the rest of the reference C parser didn't have to deal with the possibility of strings containing NUL bytes. We can do better, though, so let's! The � character is now emitted by our formatters in place of NUL, but if you use custom or manual formatters and emit any part of the AST content directly (without using comrak::html::escape, context::html::escape_href, or the same-named functions on Context), you may need to do the same translation yourself.

We also no longer append a newline to the end of the file where there wasn't one originally, which meant a lot of places in the parser had to adapt to their strings not necessarily containing a newline before they ended. Careful review and extensive fuzzing should have squeaked out any unexpected overruns, but consider my eyes peeled for reports regarding this. (Ew.) We've cleaned up some sourcepos calculation which depended on this behaviour in odd ways, but there may yet be more to discover which our test suite didn't catch.

Did you know November is Trans Month? I didn't! I'm guessing it's because Trans Awareness Week falls within it, and we've been having a pretty bad time of it rights-wise around the world lately!

Happy Trans Month, and if you happen to typo it as Trans Moth, we can be happy about that too! 🏳️‍⚧️ ᖭི༏ᖫྀ

Parser changes:

  • No longer translate NUL bytes into U+FFFD REPLACEMENT CHARACTER in the parse stage; do it in formatters instead. (by @​kivikakk in kivikakk/comrak#681)
    • This means the AST now contains NUL bytes where they were present in input, preserving the difference between NUL and literally-entered characters.
  • No longer append a virtual newline at the end of the file where missing. (by @​kivikakk in kivikakk/comrak#682)
    • The spec allows a line to end with either a newline or EOF; the reference parser would assume any given input string will always have a terminating linefeed and forced that to be the case, and so Comrak used to. Comrak no longer does.
    • We also now handle line feed, carriage return, and carriage return plus line feed (as allow'd by the spec) without pretending they're all just a line feed, meaning e.g. sourcepos for softbreaks now correctly spans two bytes when it was produced by a carriage return plus line feed.

Changed APIs:

  • Remove mandatory space before fenced codeblock info string in CommonMark output. (by @​kivikakk in kivikakk/comrak#686)
  • Write out %25 in hrefs where not part of a percent-encode sequence. (by @​kivikakk in kivikakk/comrak#687)
    • We used to leave any % character alone, such that [link](https://github.com/kivikakk/comrak/blob/main/%%20) would roundtrip without change. It now roundtrips to [link](https://github.com/kivikakk/comrak/blob/main/%25%20).
  • Relaxed tasklist matching now supports a full Unicode scalar for the character between the […], and no longer turns single-byte UTF-8 characters into the Unicode codepoint numbered at the UTF-8 byte (!). (by @​kivikakk in kivikakk/comrak#689)

New APIs:

Bug fixes:

Performance:

  • Simplify internal feed function, no longer requiring any allocation before the block parser. (by @​kivikakk in kivikakk/comrak#679, kivikakk/comrak#681)
    • This is possible due to not translating NUL and not appending a virtual EOF newline; compare before and after.
  • Don't buffer CommonMark output unless necessary. (by @​kivikakk in kivikakk/comrak#684)
    • The full output was always buffered in a string before being written to the destination, which in many cases is going to be another string. Buffering is now done only to the extent required by output options, which often will be "not at all."
  • Use SIMD for core line feed process. (by @​kivikakk in kivikakk/comrak#688)

Build changes:

  • We now build Linux release binaries against musl, making them actually useful for anyone not running my exact Nix build :') (by @​kivikakk in kivikakk/comrak#671)

... (truncated)

Commits
  • 6337099 Merge pull request #690 from kivikakk/release/v0.48.0
  • 69285ea CHANGELOG: finish 0.48.0.
  • 636cc0f CHANGELOG.md: add generated portion.
  • 95fc43b Cargo.toml: v0.48.0.
  • d149324 Merge pull request #689 from kivikakk/push-nnqpnowtsnom
  • c2509e5 tasklists: don't munge first byte into unicode codepoint.
  • 988ebcd Merge pull request #688 from kivikakk/push-ylwwmpzkwpkn
  • ae45268 jetscii for line searcher.
  • 1a38822 Merge pull request #687 from kivikakk/push-nzsmltxklmnr
  • 5cc8d40 write out %25 in hrefs where not part of a percent-encode sequence.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [comrak](https://github.com/kivikakk/comrak) from 0.43.0 to 0.48.0.
- [Release notes](https://github.com/kivikakk/comrak/releases)
- [Changelog](https://github.com/kivikakk/comrak/blob/main/CHANGELOG.md)
- [Commits](kivikakk/comrak@v0.43.0...v0.48.0)

---
updated-dependencies:
- dependency-name: comrak
  dependency-version: 0.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant