Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.release notes
~are no longer recognised as valid delimiters, meaning they will not prevent strikethrough recognition when they occur within correct delimiters. See the PR for discussion. (by @miketheman in test: add complex tilde behavior kivikakk/comrak#635)cmark-gfm, and follows the intent of the original implementation and implementor (hi!).Changed APIs:
r#unsafeis used instead ofunsafe_. (by @kivikakk in unsafe_ -> r#unsafe. kivikakk/comrak#640)--gemojisis renamed to--gemoji. (by @kivikakk in rename --gemojis to --gemoji, include shortcodes by default in CLI, freshen --help text. kivikakk/comrak#641)NodeValue::Textnow contains aCow<'static, str>instead of aString. This is a pretty major change, but means we can now create text nodes with static content without duplicating the string on the heap. This particularly benefits smart quotes and HTML entity resolution. (by @kivikakk in Refactor, simplify, speed up. kivikakk/comrak#627)&strwithout issues); to write in-place, use.to_mut()on theCowto get a&mut String. To assign, use.into()on a&strorString, likeNodeValue::Text("moo".into()).NodeValue::text()now returns a&str. It used to return a&String(!).NodeValue::text_mut()now returns a&mut Cow<'static, str>, instead of a&mut String. This permits writing a borrowed reference.Cow; it'd be amazing to refer continuously to the input where possible.NodeValue'sCodeBlock,Table,Link,Image,ShortCodeandAlertvariants' payloads are now boxed. (by @kivikakk in eliminate some shifts in table parser and clarify. kivikakk/comrak#632)Box::newcall when constructing these nodes, and on matches, pulling the box out and then just dereferencing it directly (e.g.NodeValue::Table(nt) => &nt.alignmentsinstead ofNodeValue::Table(NodeTable { ref alignments }).Astto 128 bytes, and a fullAstNode<'_>to 176 bytes.NodeValueresults in worse performance than doing nothing at all. This change appreciably improves matters.Ast.comrak::options. Structs have been renamed to removeOptionsfrom their name:comrak::RenderOptionsis nowcomrak::options::Render, etc. The old names are marked deprecated. (@kivikakk in move options into their own module. kivikakk/comrak#636)URLRewriterandBrokenLinkCallbackhave been moved, without a deprecation period.SyntaxHighlighterAdapter'sattributesarguments now takeHashMap<&'static str, Cow<'s, str>>; they used to takeHashMap<String, String>. (by @kivikakk in Remove needless clones and reborrows. kivikakk/comrak#633)html::write_opening_tagcan now take differentAsRef<str>types for the attribute key and value.parse_document_with_broken_link_callbackhas been removed! This entrypoint has been deprecated since 0.25.0. (by @kivikakk in Remove parse_document_with_broken_link_callback (deprecated), and moveignore_setextto parse. kivikakk/comrak#623)options.render.ignore_setextwas moved tooptions.parse.ignore_setext, as its effect takes place only in the parse stage. (by @kivikakk in Remove parse_document_with_broken_link_callback (deprecated), and moveignore_setextto parse. kivikakk/comrak#623)nodes::can_contain_typeis nowNode::can_contain_type. (by @kivikakk in improvements from #617. kivikakk/comrak#625)New APIs:
node.data()andnode.data_mut()are added as short-hand fornode.data.borrow()andnode.data.borrow_mut()respectively. (by @kivikakk in add node.data() and node.data_mut() shorthand. kivikakk/comrak#643)comrak::nodes::Node<'a>is introduced as an alias for&'a comrak::nodes::AstNode<'a>. (by @kivikakk in Refactor, simplify, speed up. kivikakk/comrak#627)options.parse.tasklist_in_tableadded: parse a tasklist item if it's the only content of a table cell. (by @kivikakk in tasklist_in_table: parse a tasklist item if it's the only content of a table cell. kivikakk/comrak#622)Performance:
strinternally in block and inline processing, eliminating many UTF-8 rechecks. Thestringsmodule actually operates on strings now. (by @kivikakk in use str internally much more. kivikakk/comrak#626)Dependency updates:
memchrremoved fromCargo.toml; it wasn't used directly, though it still is included unconditionally due tocaseless. (by @kivikakk in Use jetscii for SIMD searching. kivikakk/comrak#630)slugis moved to a development-only dependency; it's only used in an example. (by @kivikakk in Use jetscii for SIMD searching. kivikakk/comrak#630)jetsciiis added for faster string searching, including SIMD on x86_64. (by @kivikakk in Use jetscii for SIMD searching. kivikakk/comrak#630)Documentation:
READMEexample code is updated to build with recent API changes. (by @kivikakk in README: sync to sample (and improve sample quality). kivikakk/comrak#621)Build changes:
shortcodesis enabled by default (but still optional) for CLI builds. (by @kivikakk in rename --gemojis to --gemoji, include shortcodes by default in CLI, freshen --help text. kivikakk/comrak#641)syntectis now optional (but still default) in CLI builds. (by @kivikakk in syntect optional in cli; disable syntax highlighting in bench. kivikakk/comrak#624)Behind the scenes:
unsafeblocks now have aSAFETYcomment describing why their actions are safe.New Contributors
Diff: kivikakk/comrak@v0.44.0...v0.45.0
View the full release notes at https://github.com/kivikakk/comrak/releases/tag/v0.45.0.