comrak

CommonMark + GFM compatible Markdown parser and renderer

OTHER License

Downloads
49
Stars
1.1K
Committers
67

Bot releases are visible (Hide)

comrak - Latest Release

Published by kivikakk 3 months ago

Diff: https://github.com/kivikakk/comrak/compare/v0.25.0...v0.26.0

comrak -

Published by kivikakk 3 months ago

  • Discord-flavored Markdown by @liamwhite in https://github.com/kivikakk/comrak/pull/421
    • Three new extensions and two render options are added:
      • extension.underline adds support for __underlined__ text.
      • extension.spoiler adds support for ||spoiler|| text.
      • extension.greentext adds support for image board-style >greentext, which isn't transformed into a blockquote.
      • render.ignore_setext disables parsing setext-style headings.
      • render.ignore_empty_links causes links with no text (like [](xyz)) to remain in the text as-is.
  • nodes: add From impls for AstNode. by @kivikakk in https://github.com/kivikakk/comrak/pull/424
    • Back by popular demand: AstNode::from(NodeValue).
    • Also added is AstNode::from(Ast), if you have sourcepos.
  • AST validation by @yannham in https://github.com/kivikakk/comrak/pull/425
    • The AST is validated when formatting a document as CommonMark in debug builds.
  • Address autolink edge cases. by @kivikakk in https://github.com/kivikakk/comrak/pull/426
    • Autolinks had many edge cases where output differed from upstream cmark-gfm. These have been fixed by following upstream's parser design closely.
  • shortcodes: capture all known aliases. by @kivikakk in https://github.com/kivikakk/comrak/pull/427
    • We didn't parse shortcodes containing numbers or +. We do now.
  • Support both upstream CommonMark and GFM's differences in the base spec. by @kivikakk in https://github.com/kivikakk/comrak/pull/428
    • GFM modifies even base CommonMark output somewhat. We now support and validate against both.
  • cm: count ol items from start of each list. by @kivikakk in https://github.com/kivikakk/comrak/pull/429
    • Ordered list item numbers are normalised on formatting back to CommonMark.
  • arena_tree: panic if iterator invalidation causes trouble. by @kivikakk in https://github.com/kivikakk/comrak/pull/437
    • arena_tree would silently stop iteration when trying to proceed from a child that had lost its parent. It now panics instead, as the old behaviour is incorrect and impossible to notice.
  • broken reflink callback updates & big cleanup. by @kivikakk in https://github.com/kivikakk/comrak/pull/438
    • The broken reference link callback has been moved into ParseOptions (which now takes a lifetime, meaning Options does too).
    • The callback now takes a struct containing both the normalised reference, and the original text, and the return value has changed from a 2-tuple to a struct for clarity.
    • parse_document_with_broken_link_callback has been marked deprecated.
  • Inline sourcepos fixes. by @kivikakk in https://github.com/kivikakk/comrak/pull/439
    • Inline sourcepos was provided on a best-effort basis, but there are multiple correctness issues which can't be fixed without significant work.
    • Inline sourcepos is no longer reported in HTML output. It remains in the AST and in XML output, but it is not reliable. See the PR for details.
    • Link sourcepos is slightly better than it was when it spans multiple lines.

New Contributors

Diff: https://github.com/kivikakk/comrak/compare/v0.24.1...v0.25.0

comrak - v0.24.1

Published by github-actions[bot] 5 months ago

What's Changed

Full Changelog: https://github.com/kivikakk/comrak/compare/0.23.0...v0.24.1

comrak - v0.23.1-pre.3

Published by github-actions[bot] 6 months ago

comrak - v0.23.1-pre.2

Published by github-actions[bot] 6 months ago

What's Changed

Full Changelog: https://github.com/kivikakk/comrak/compare/0.23.0...v0.23.1-pre.2

comrak - 0.23.0

Published by kivikakk 6 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.22.0...0.23.0

comrak - 0.22.0

Published by kivikakk 7 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.21.0...0.22.0

comrak - 0.21.0

Published by kivikakk 9 months ago

What's Changed

Full Changelog: https://github.com/kivikakk/comrak/compare/0.20.0...0.21.0

comrak - 0.20.0

Published by kivikakk 11 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.19.0...0.20.0

comrak - 0.19.0

Published by charlottia about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.18.0...0.19.0

comrak - 0.18.0

Published by kivikakk over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.17.1...0.18.0

comrak - 0.17.1

Published by kivikakk over 1 year ago

What's Changed

  • Fix some panics found by trivial fuzzing.

Full Changelog: https://github.com/kivikakk/comrak/compare/0.17.0...0.17.1

comrak - 0.17.0

Published by kivikakk over 1 year ago

What's Changed

This contains some breaking changes from an API point of view, but output is largely unchanged. Spec compliance is improved, and benchmark runtime is over 20% faster.

Many thanks to @philipturnbull and @darakian of the GitHub Security Lab for bringing these issues to my attention and detailing the reproduction steps for each case.

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.16.0...0.17.0

comrak - 0.16.0

Published by kivikakk over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.15.0...0.16.0

comrak - 0.15.0

Published by kivikakk almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.14.0...0.15.0

crates.io: https://crates.io/crates/comrak/0.15.0

comrak - 0.14.0

Published by kivikakk over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/kivikakk/comrak/compare/0.13.2...0.14.0

crates.io: https://crates.io/crates/comrak/0.14.0

comrak -

Published by kivikakk over 2 years ago

Changes since last release (https://github.com/kivikakk/comrak/compare/0.13.1...0.13.2)

  • Fix Windows build.

On crates.io: https://crates.io/crates/comrak/0.13.2

comrak -

Published by kivikakk over 2 years ago

Changes since last release (https://github.com/kivikakk/comrak/compare/0.13.0...0.13.1)

  • Support compiling for WASM. (#222, Ben Wishoshavich)
  • Replace deprecated twoway dependency. (#224)

On crates.io: https://crates.io/crates/comrak/0.13.1

Windows build includes c465cb5.

comrak -

Published by kivikakk over 2 years ago

Changes since last release (https://github.com/kivikakk/comrak/compare/0.12.1...0.13.0)

  • SECURITY: Bump regex to 1.5.5. (#221, Dependabot)
  • Drop unneeded YAML dependency from Syntect. (#199, Chris Wong)
  • Match newline handling in code inlines to upstream, and improve test failure reporting. (#210, Michael Anderson)
  • Make all node value fields public. (#216, Evan Schwartz)
  • Line break handling adjustments. (#214, Michael Anderson)
  • Disable control characters in link definitions. (#219, Michael Anderson)

On crates.io: https://crates.io/crates/comrak/0.13.0

comrak -

Published by kivikakk about 3 years ago

Changes since last release (https://github.com/kivikakk/comrak/compare/0.12.0...0.12.1)

  • Only load syntax and theme sets once, on Syntect plugin instantiation. (#197)
  • Match syntax highlighting language names more loosely. (#198)

On crates.io: https://crates.io/crates/comrak/0.12.1

Package Rankings
Top 35.31% on Pypi.org
Top 6.74% on Proxy.golang.org
Top 3.1% on Crates.io
Badges
Extracted from project README
Build status CommonMark: 652/652 GFM: 670/670 crates.io version docs.rs Small chart showing Comrak contributors.
Related Projects