chore(deps): update rust crate comrak to v1 #212
No reviewers
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier!212
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/comrak-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.59.0→1.0.0Release Notes
kivikakk/comrak (comrak)
v1.3.0Compare Source
First up, we have two external advisories being published with their fixes this release. Additionally, someone decided to run Mythos on Comrak, meaning we found even more quadratic bugs! (:
There's also some new specs, features, and lots of fixes and cleanups all over the codebase from a wide range of contributors!
Enjoy. :)
Security:
format_commonmarkwriting out CommonMark that reads back as a different document, published as GHSA-4ph3-gfgp-5p93.unsafe, that's HTML injection! The entity case was easy to hit:[t](javascript&#​58;alert(1))read and written back out became ajavascript:link. Comrak's own HTML formatter was unaffected. (reported by @enstyled, fixed by @kivikakk in #968)Parser changes:
|| test ||,(|| x ||)anda||b||care all spoilers now, per Discord, and||is now correctly exempt from the rule of 3. (by @liamwhite in #962 and #964):in the info string, such that:::toggle Day 1: arrivalbegins one. (reported by @bennobuilder in #967, fixed by @kivikakk indfbabdb)parse.escaped_char_spanskeepsEscapednodes in wikilink labels too, and their text's sourcepos covers only the escaped character. (by @kivikakk in #957)New APIs:
serdefeature, which derivesSerializeandDeserializefor AST nodes and options. (by @jeremy-code in #963)Bug fixes:
1.), now starts an empty list item. (by @kivikakk in #970), the first code point after the UTF-16 surrogates, no longer decodes to U+FFFD. (by @liamwhite in #958)full_info_stringonly skips spaces and tabs after the language, keeping other whitespace indata-meta. (by @kivikakk in #959)widthcould break; (by @kivikakk in #968)hardbreaks, giving output that is interpreted the same without the option; (by @kivikakk in #961)Dependency updates:
@dependabot[bot]in #951)@dependabot[bot]in #966)@dependabot[bot]in #965)Documentation:
description_listsandrender.full_info_string, and the CLI help for--full-info-string. (by @kivikakk in063f185, #959, and #961)CONTRIBUTING.md. (97b0257)Behind the scenes:
Diff: https://github.com/kivikakk/comrak/compare/v1.2.0...v1.3.0
v1.2.0Compare Source
We have two exciting bits of news today: there's some new quadratic features, which I've decided I don't like and am addressing (they are not features, they are bugs), and some newly specced extensions.
Share and enjoy!
Security:
tableandautolinkare both in--gfm, so you almost certainly want to upgrade if you process untrusted content. (reported by @sventmueller, fixed by @kivikakk in #948)<,sourcepos_charson long lines, unclosed inline footnotes, unclosed LaTeX math, strikethrough and highlight delimiter runs, long>runs with alerts or multiline block quotes, and unclosed HEEx directives.width.experimental_minimize_commonmarkis skipped when it would be costly.Parser changes:
$a\\$ b$now gets closed aftera\\, and\(a\\)b\)gets closed at the final\).$``a`b``$now works, and$`a`b`$is no longer math.```mathcode blocks are math only withmath_code. They always were before, even without any extensions enabled! Info strings likemath foocount too.:now follows list marker rules: it can stand alone (a\n:is now a description list), its content can start on the next line, and five or more spaces after it produce indented code.<dt>or<dd>they end, instead of the<dl>.[a^2^](/u)and[c^2^]now work.^and~, soa^b.^candx^(1)^ynow work.^^a^^nested superscript.a~~(b)~~ cremains literal with it on as with it off.header_id_prefix: explicit IDs from attributes, footnote and footnote reference IDs, and OFM block IDs.-1.Anchorizerstarts with""reserved.Bug fixes:
data-metaand attributes like other code blocks. (by @kivikakk in #942)superscript. (by @kivikakk in #946)<escaped_tag~~>, but<escaped_tag tag="~~">. (by @kivikakk in #946)tighttodescription_item. (by @kivikakk in #945)Documentation:
github_pre_lang, sourcepos, header IDs, description lists, and superscript and subscript with care. (by @kivikakk in #941, #942, #943, #944, #945, #946)description_listsandrender.sourceposdocs. (by @kivikakk in #943)Diff: https://github.com/kivikakk/comrak/compare/v1.1.0...v1.2.0
v1.1.0Compare Source
Remember this line from earlier this week?
WE'RE HERE. Enjoy!
Parser changes:
[^&#​97;]no longer matches[^a], and[^`b`]now matches[^`b`]:. Unmatched references are just left as-is:[^*b*]renders emphasis![no longer stops a following wikilink from parsing, meaning[blah [[Home]]now links[[Home]]like you'd expect.%0A.>[!note]and up to three spaces or a tab after the>now start an alert, and for multiline alerts too. (by @kivikakk in #938)_or:, values may be unquoted (e.g.{k=a/b}), and entities in values are decoded.id=andclass=pairs set the ID and add classes; the last ID or pair with a given key takes precedence; consecutive attribute blocks on inline code and links get merged, e.g.`x`{.a}{#b}.\{and&#​123;no longer start them.Changed APIs:
render.attributes, Comrak's own HTML attributes now take precedence over parsed ones, instead of being overridden, and we don't emit any attribute twice.[a](/u){href=/v}getshref="/u". (by @kivikakk in #939)Bug fixes:
NodeFootnoteReference::textsholds the label as written in the source, instead of one rebuilt from parsed inlines. So long, "awful HACK". (by @kivikakk in #935)<li>is followed by a newline in HTML. (by @kivikakk in #935)%09, not% 9D:). (by @kivikakk in #936)>on blank lines after code and HTML blocks in blockquotes. (by @kivikakk in #938)Documentation:
140a1a1, #938, and #939)931f5e4,8129ed5,448a093)Diff: https://github.com/kivikakk/comrak/compare/v1.0.0...v1.1.0
v1.0.0Compare Source
Ten years ago today, we find
280de0d:I'd recently been put onto the CommonMark migration at
work,
and there was this neat new systems language called Rust that I really wanted
to try out in earnest. What a good opportunity! I had no idea it'd become
my longest-lived project, and lead to so many interesting connections and
collaborations. My life has changed a lot because of this project (and, uh,
perhaps my tenacity in keeping on with it during the years when there wasn't
much in the way of intrinsic or extrinsic motivation to do so), and I'm really
happy for that.
Happy 10th birthday, Comrak!
For users coming from 0.x (0.59.0), please read the release candidate changes
too. Between rc.2 and here, I've marked ~just about everything non-exhaustive
that can be, replaced some argument lists with structs; whatever we needed to
make sure we can add to Comrak in future without necessitating a major version
bump. You'll find some new constructors and builders that'll need to be used in
place of creating the struct yourself.
What does 1.0 mean beyond API semver?
Here's what we commit to:
dangerous_urltightening). If there was any way we weren't compatible with the current CommonMark target (and it'd have to be a textual interpretation issue, as we're always passing the executable spec), that'd be a bug and also come in here.#[doc(hidden)]items: may change.#[doc(hidden)]items: may change.--extension,--list-style); nothing else.#[doc(hidden)]items: may change.API deprecations will be flagged in a minor release, to be removed in the next major.
Note that each output format also has its own nuances:
data-attributes is breaking.Strongnode may be output as__strong__today and**strong**tomorrow under default options and I wouldn't call that breaking. Your code block may come out with a different length fence, so long as it means the same thing.< like / > < this / >. I won't, but I might be lying.Okay, gimme the changes
Changed APIs:
Options,Extension,Parse,Render,PluginsandRenderPluginsare#[non_exhaustive]; start fromDefaultand modify, or use the builders, including the newOptions::builder().Renderis no longerCopy. We loseCopyin case we want to add a non-Copyelement in the future (likeStringorVec).NodeValueand its payload structs are#[non_exhaustive]; payloads get constructors, likeNodeList::bullet,NodeList::ordered,NodeCodeBlock::fenced, andNodeLink::new.NodeList,NodeDescriptionItem,NodeHeading,NodeTaskItem,NodeMultilineBlockQuote,GridTableColumn, andNodeGridTableCellare no longerCopy.NodeValue::ThematicBreak,Emph,Strong, andStrikethroughget (intentionally blank) payload structs, andTableRow(bool)is nowTableRow(NodeTableRow).AlertType,AlertStyleType,Attributes,ChildRendering,HeexNode, andValidationErrorare#[non_exhaustive].CodefenceRendererAdapter::writetakes aCodefenceMeta, and allSyntaxHighlighterAdaptermethods take aSyntaxHighlightMeta, which has a now-non-optionallang(we always passed it), plusmeta.HeadingAdapter::entergets its sourcepos fromHeadingMeta;HeadingAdapter::exitgets it too now.ResolvedReferenceandBrokenLinkReferenceare#[non_exhaustive]; useResolvedReference::new.options::WikiLinksModeis no longer public (its only ctor wasn't).clap,shell-words,xdg,fmt2io, andemojisare gone. They weren't helpful, as we didn't do feature detection on them anyway; usecliandshortcodes.New APIs:
math_dollars_blockextension andNodeValue::MathBlock. (added by @szdytom in #931)SourceposimplementsDefault. (by @kivikakk in #933)Documentation:
Build changes:
cargo semver-checksagainst the latest release. (by @kivikakk in #933)Behind the scenes:
all_optionsfuzz target generates options withArbitrary. (by @kivikakk in #933)Diff: https://github.com/kivikakk/comrak/compare/v1.0.0-rc.2...v1.0.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.