3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

Land the maintainer's two decisions: the reader's home and the claim code's name

This commit is contained in:
2026-08-28 12:09:35 +02:00
parent 6c2b5afbaa
commit 0cb6bb517e
3 changed files with 6 additions and 4 deletions
+1
View File
@@ -36,6 +36,7 @@ test('keeps the link reference definitions a paragraph gives up, the first of a
test('leaves the paragraph a line no definition spells', () => {
assert.deepEqual(definitions('[]: /url\n'), [])
assert.deepEqual(definitions('[ ]: /url\n'), [])
assert.deepEqual(definitions('[a]: <un>closed>\n'), [])
assert.deepEqual(definitions('[a]: <unclosed\n'), [])
assert.deepEqual(definitions('[a]: /url)x\n'), [])
@@ -37,7 +37,6 @@ function readDefinition(text: string): ReadDefinition | undefined {
return { definition: { destination: destination.value }, label: name, length: plain }
}
// CommonMark's label matching: the whitespace a label holds collapses, and its case folds.
function normalizeLabel(raw: string): string {
return raw
.replace(/^[ \t\n]+|[ \t\n]+$/g, '')