File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import slugify from 'slugify';
99// tests: tests/canon-integrity.test.mjs
1010// === END MODULE_BUILD ===
1111
12- const parserVersion = '0.4.0 ' ;
12+ const parserVersion = '0.4.1 ' ;
1313const provenance = JSON . parse ( await readFile ( 'src/_data/snapshots/canon.provenance.json' , 'utf8' ) ) ;
1414const raw = await readFile ( 'src/_data/snapshots/canon.last-known-good.md' , 'utf8' ) ;
1515const text = raw . replace ( / ^ - - - \n [ \s \S ] * ?\n - - - \n / , '' ) ;
@@ -54,8 +54,13 @@ function extractNotes(content) {
5454 notes . push ( { marker : `[${ bracket [ 1 ] } ]` , text : bracket [ 2 ] . trim ( ) } ) ;
5555 continue ;
5656 }
57- const numbered = / ^ \s * > ? \s * ( [ ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ] + | \d + ) \s + ( .+ ) $ / . exec ( line ) ;
58- if ( numbered ) notes . push ( { marker : numbered [ 1 ] , text : numbered [ 2 ] . trim ( ) } ) ;
57+ const superscript = / ^ \s * > ? \s * ( [ ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ] + ) \s * ( .+ ) $ / . exec ( line ) ;
58+ if ( superscript ) {
59+ notes . push ( { marker : superscript [ 1 ] , text : superscript [ 2 ] . trim ( ) } ) ;
60+ continue ;
61+ }
62+ const digit = / ^ \s * > ? \s * ( \d + ) \s + ( .+ ) $ / . exec ( line ) ;
63+ if ( digit ) notes . push ( { marker : digit [ 1 ] , text : digit [ 2 ] . trim ( ) } ) ;
5964 }
6065 return notes ;
6166}
You can’t perform that action at this time.
0 commit comments