@@ -239,12 +239,12 @@ export function parseMatches(text: string, args: ParseMatchesArgs): Match[] {
239239
240240 // For debugging: search for and uncomment other "For debugging" lines
241241 // table.push([
242- // charIdx,
242+ // String( charIdx) ,
243243 // char,
244244 // `10: ${char.charCodeAt(0)}\n0x: ${char.charCodeAt(0).toString(16)}\nU+${char.codePointAt(0)}`,
245245 // stateMachines.map(machine => `${machine.type}${'matchType' in machine ? ` (${machine.matchType})` : ''}`).join('\n') || '(none)',
246246 // stateMachines.map(machine => State[machine.state]).join('\n') || '(none)',
247- // charIdx,
247+ // String( charIdx) ,
248248 // stateMachines.map(m => m.startIdx).join('\n'),
249249 // stateMachines.map(m => m.acceptStateReached).join('\n'),
250250 // ]);
@@ -382,10 +382,11 @@ export function parseMatches(text: string, args: ParseMatchesArgs): Match[] {
382382
383383 function stateSchemeSlash2 ( stateMachine : StateMachine , char : string ) {
384384 if ( char === '/' ) {
385- // 3rd slash, must be an absolute path (path-absolute in the
386- // ABNF), such as in a file:///c:/windows/etc. See
385+ // 3rd slash, must be an absolute path (` path-absolute` in the
386+ // ABNF), such as in " file:///c:/windows/etc" . See
387387 // https://tools.ietf.org/html/rfc3986#appendix-A
388388 stateMachine . state = State . Path ;
389+ stateMachine . acceptStateReached = true ;
389390 } else if ( isDomainLabelStartChar ( char ) ) {
390391 // start of "authority" section - see https://tools.ietf.org/html/rfc3986#appendix-A
391392 stateMachine . state = State . DomainLabelChar ;
@@ -1092,7 +1093,7 @@ export function excludeUnbalancedTrailingBracesAndPunctuation(matchedText: strin
10921093}
10931094
10941095// States for the parser
1095- // For debugging: temporarily remove ' const'
1096+ // For debugging: temporarily remove ` const` from `const enum`
10961097const enum State {
10971098 // Scheme states
10981099 SchemeChar = 0 , // First char must be an ASCII letter. Subsequent characters can be: ALPHA / DIGIT / "+" / "-" / "."
0 commit comments