mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 15:42:58 +01:00
Spell a line in memory linear in its length, so a paragraph up to V8's longest string converts within Node's default heap
This commit is contained in:
@@ -91,6 +91,10 @@
|
||||
list lines ran the call out of memory.
|
||||
- Fix the markdown readers past the longest string or array the JavaScript engine builds: they
|
||||
return `unsupported-node-shape` where they threw.
|
||||
- Fix a paragraph of tens of millions of characters: `adfToLosslessMarkdown` and
|
||||
`adfToPortableMarkdown` write one up to 536870888 characters within Node's default heap, where 80
|
||||
million characters ran out of memory and 20 million `*` threw `RangeError`. `losslessMarkdownToAdf`
|
||||
no longer throws on such a paragraph inside a directive.
|
||||
- Fix deeply nested compact JSON in an `adf:` fence: `losslessMarkdownToAdf` refuses it as
|
||||
`unsupported-node-shape`, as it refuses any compact JSON there, where about a megabyte of it threw.
|
||||
- Add `adfToPortableMarkdown` and `portableMarkdownToAdf`, a lossy pair converting ADF to and from
|
||||
|
||||
Reference in New Issue
Block a user