Make markdownToAdf(adfToMarkdown(doc)) deep-equal doc: textBreak, empty keys, -0, typed carry fences, code blocks of several text nodes
This commit is contained in:
@@ -18,7 +18,7 @@ export function serializeCanonicalJson(value: JsonValue, spelling: JsonSpelling)
|
||||
const { depth, value: held } = next
|
||||
if (Array.isArray(held)) schedule(pending, '[', held.map((item) => ({ label: '', value: item })), ']', indent, depth)
|
||||
else if (held !== null && typeof held === 'object') schedule(pending, '{', objectMembers(held, indent), '}', indent, depth)
|
||||
else text.push(JSON.stringify(held))
|
||||
else text.push(Object.is(held, -0) ? '-0' : JSON.stringify(held))
|
||||
}
|
||||
return text.join('')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user