3
0
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:
2026-10-11 20:30:42 +02:00
committed by Lillem4n
parent 0b3f6e8973
commit a9331b4125
14 changed files with 105 additions and 30 deletions
+4
View File
@@ -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,