mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 15:42:58 +01:00
Answer architecture round 6: each block is held to the bound as it is built, the reader's ask takes the engine guard, and the chunk ships under a worse comprehension ruling by the maintainer's call, with item 110 to fill the memo in one place
This commit is contained in:
@@ -64,23 +64,6 @@ test('refuses lines their quotes would prefix past V8\'s longest string', () =>
|
||||
assert.equal(markdown(adfToLosslessMarkdown(document({ content: [code, code], type: 'blockquote' }))), tooLong)
|
||||
})
|
||||
|
||||
test('refuses a directive whose opener and body together would pass V8\'s longest string', () => {
|
||||
const long = 'a'.repeat(2 ** 28)
|
||||
const expand: AdfNode = { attrs: { title: long }, content: [{ content: [{ text: long, type: 'text' }], type: 'codeBlock' }], type: 'expand' }
|
||||
assert.equal(markdown(adfToLosslessMarkdown(document(expand))), tooLong)
|
||||
})
|
||||
|
||||
test('refuses a list whose item markers would carry its lines past V8\'s longest string', () => {
|
||||
const item: AdfNode = { content: [nearlyHalfTheBound()], type: 'listItem' }
|
||||
assert.equal(markdown(adfToLosslessMarkdown(document({ content: [item, item], type: 'bulletList' }))), tooLong)
|
||||
})
|
||||
|
||||
test('refuses a directive opener whose attributes together would pass V8\'s longest string', () => {
|
||||
const long = 'a'.repeat(2 ** 28)
|
||||
const panel: AdfNode = { attrs: { panelColor: long, panelIcon: long, panelIconText: long, panelType: 'custom' }, content: [paragraph({ text: 'x', type: 'text' })], type: 'panel' }
|
||||
assert.equal(markdown(adfToLosslessMarkdown(document(panel))), tooLong)
|
||||
})
|
||||
|
||||
test('refuses text past V8\'s longest string', () => {
|
||||
const long = 'a'.repeat(2 ** 28)
|
||||
const result = adfToLosslessMarkdown(document(paragraph({ text: long, type: 'text' }, { text: long, type: 'text' }, { text: long, type: 'text' })))
|
||||
|
||||
Reference in New Issue
Block a user