lexical_markdown 1.7.4 copy "lexical_markdown: ^1.7.4" to clipboard
lexical_markdown: ^1.7.4 copied to clipboard

Markdown import and export for lexical_core, built from composable transformers: headings, quotes, lists, code fences, links and inline formatting. Pure Dart.

Changelog #

1.7.4 #

Two importer bugs, both of which changed what a document says.

A code span is taken exactly as written. `a **b**` is the characters a **b** in markdown, so parsing emphasis inside it invented formatting the author never wrote — and exported as `a `**`b`**, which is neither the same document nor valid markdown. Inline parsing now stops inside a span declared literal, which the backtick transformer is.

A backslash-escaped delimiter is a character, not a delimiter. \*kein Stern\* came back as emphasis with the backslashes stranded in the text. Both are what CommonMark and upstream do.

1.7.3 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_core for what changed.

1.7.2 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_core for what changed.

1.7.1 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_link for what changed.

1.7.0 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_image and lexical_flutter for what changed.

1.6.1 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_image for what changed.

1.6.0 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_image for what changed.

1.5.0 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_image for what changed.

1.4.0 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_flutter for what changed.

1.3.0 #

No library changes. The packages version in lockstep — they are one library split for pay-for-what-you-use, not a set of independent projects — so this release keeps the set on one version. See lexical_core for what changed.

1.2.0 #

Fixed: a nested list was built in the wrong shape. The nested list was appended to the item holding its parent's text, and every item stayed at indent: 0. Lexical puts a nested list in an item of its own, next to the one it sits under, and carries the nesting depth on the items. Both shapes hold the same words, which is why this survived reading the output — but anything that walks structure rather than text, including a Lexical web client opening the same document, saw a different tree. Import now produces the canonical shape, and numbering counts the holder items the way Lexical does.

Fixed: a link label was taken as characters rather than as markdown. [ein *kursiver* Link](url) kept its asterisks, where CommonMark — and every parser a document travels to — reads emphasis inside a label. The label is now parsed with the same inline rules, and emphasis around the link is kept rather than traded for the emphasis inside it.

  • horizontalRuleTransformer, in defaultMarkdownTransformers: ---, *** and ___ on a line of their own become a HorizontalRuleNode (new in lexical_rich_text 1.2.0). All three spellings, because the inline rules claim the other two otherwise — by the time a *** line reaches a block rule it has already become an empty emphasis run and a stray asterisk.
  • TextMatchTransformer.parsesInlineContent, off by default: says that the text a rule puts inside its node is itself markdown. A link opts in; a rule whose content is deliberately literal does not, and keeps its characters.

1.1.0 #

  • $parseMarkdownInline, for a rule whose text is not the last captured group — a table row, where every cell is its own inline run.
  • ElementTransformer.exportsSubtree, for a block that renders its own children. Without it a table's cells are appended a second time under the table.

1.0.0 #

First stable release; semantic versioning applies from here. Markdown import, export and shortcut transforms.

The entries below record how it got here.

0.1.0-dev.1 #

First development release.

Added #

  • $convertFromMarkdown and $convertToMarkdown, driven by a MarkdownTransformers set that describes each construct in both directions.
  • defaultMarkdownTransformers: headings, quotes, fenced code, bullet, ordered and check lists with nesting, links, and the four inline formats.
  • Delimiter matching that gets ***both*** right, by requiring a closing delimiter to sit at the end of its run rather than taking the first one it finds.
0
likes
160
points
541
downloads

Documentation

API reference

Publisher

verified publisherahmadre.com

Weekly Downloads

Markdown import and export for lexical_core, built from composable transformers: headings, quotes, lists, code fences, links and inline formatting. Pure Dart.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

lexical_code, lexical_core, lexical_link, lexical_list, lexical_rich_text, meta

More

Packages that depend on lexical_markdown