Answer the stability nits: the guard proves the value, not just the row
CI / gate (push) Successful in 5s
CI / gate (push) Successful in 5s
This commit is contained in:
@@ -231,7 +231,6 @@ function claimsCharacter(
|
||||
return false
|
||||
}
|
||||
|
||||
// The last `]` link text could close on, so a `[` ahead of it opens one and a `[` past it cannot.
|
||||
// A `]` the emitter spelled sits inside a construct that binds before link text does.
|
||||
function lastLinkClose(scan: string, escapings: readonly (InlineEscaping | undefined)[]): number {
|
||||
for (let cursor = scan.length - 1; cursor >= 0; cursor -= 1) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import test from 'node:test'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { dirname, join } from 'node:path'
|
||||
import test from 'node:test'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { readEntityReference } from './entity-references.ts'
|
||||
|
||||
@@ -16,6 +16,6 @@ test('every packed reference parts into one name and one value the table decodes
|
||||
assert.equal(references.length, 2125)
|
||||
for (const reference of references) {
|
||||
assert.match(reference, /^[A-Za-z][A-Za-z0-9]*~[^ ~]+$/)
|
||||
assert.ok(readEntityReference(`&${reference.slice(0, reference.indexOf('~'))};`, 0) !== undefined)
|
||||
assert.ok((readEntityReference(`&${reference.slice(0, reference.indexOf('~'))};`, 0)?.text ?? '') !== '')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user