mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 07:32:58 +01:00
Return a result where a conversion's text would pass the engine's longest string
This commit is contained in:
@@ -83,6 +83,10 @@
|
||||
- Fix a cyclic document, in which an object holds itself: `adfToLosslessMarkdown` and
|
||||
`adfToPortableMarkdown` refuse it as `not-an-adf-document` and `isAdfDocument` returns `false`,
|
||||
where all three hung.
|
||||
- Fix a document whose markdown runs past the longest string the JavaScript engine holds, about 537
|
||||
million characters on V8: `adfToLosslessMarkdown` and `adfToPortableMarkdown` refuse it as
|
||||
`unsupported-node-shape`, where they threw. `losslessMarkdownToAdf` refuses compact JSON in an
|
||||
`adf:` fence in time linear in it, where a megabyte of deeply nested JSON threw.
|
||||
- Add `adfToPortableMarkdown` and `portableMarkdownToAdf`, a lossy pair converting ADF to and from
|
||||
markdown GitHub, GitLab and Obsidian render: alerts, callouts, task lists, `==highlights==` and
|
||||
pipe tables. A task item keeps its paragraphs, then its nested task lists; the rest of the item,
|
||||
|
||||
Reference in New Issue
Block a user