File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function lex<T>(parser: Parser<T>): Parser<T> {
3232}
3333const comment = checkedSequence (
3434 matchString ( "#" , "hash sign" ) ,
35- match ( / [ ^ \n ] * ?(? = \r ? \n ) / , "comment content" ) ,
35+ match ( / [ ^ \n ] * ?(? = \r ? \n | $ ) / , "comment content" ) ,
3636) ;
3737const spaces = checkedSequence (
3838 match ( / \s / , "space" ) ,
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const cartoucheElement = choiceOnlyOne(
121121 )
122122 . map ( ( [ word , dots ] ) => {
123123 const count = / ^ [ a e i o u ] / . test ( word ) ? dots + 1 : dots ;
124- const morae = word . match ( / [ a e i o u ] | [ j k l m n p s t w ] [ a e i o u ] | n / g) ! ;
124+ const morae = word . match ( / [ j k l m n p s t w ] ? [ a e i o u ] | n / g) ! ;
125125 if ( count < morae . length ) {
126126 return morae . slice ( 0 , count ) . join ( "" ) ;
127127 } else {
Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ function generateError(
232232 source = "newline" ;
233233 length = 0 ;
234234 } else {
235- const [ token ] = sourceString . match ( / \s * ?(? = \r ? \n | $ ) / ) ! ;
235+ const [ token ] = sourceString . match ( / \s + ?(? = \r ? \n | $ ) / ) ! ;
236236 source = "space" ;
237237 length = token . length ;
238238 }
You can’t perform that action at this time.
0 commit comments