File tree 3 files changed +3
-3
lines changed
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> {
32
32
}
33
33
const comment = checkedSequence (
34
34
matchString ( "#" , "hash sign" ) ,
35
- match ( / [ ^ \n ] * ?(? = \r ? \n ) / , "comment content" ) ,
35
+ match ( / [ ^ \n ] * ?(? = \r ? \n | $ ) / , "comment content" ) ,
36
36
) ;
37
37
const spaces = checkedSequence (
38
38
match ( / \s / , "space" ) ,
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const cartoucheElement = choiceOnlyOne(
121
121
)
122
122
. map ( ( [ word , dots ] ) => {
123
123
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) ! ;
125
125
if ( count < morae . length ) {
126
126
return morae . slice ( 0 , count ) . join ( "" ) ;
127
127
} else {
Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ function generateError(
232
232
source = "newline" ;
233
233
length = 0 ;
234
234
} else {
235
- const [ token ] = sourceString . match ( / \s * ?(? = \r ? \n | $ ) / ) ! ;
235
+ const [ token ] = sourceString . match ( / \s + ?(? = \r ? \n | $ ) / ) ! ;
236
236
source = "space" ;
237
237
length = token . length ;
238
238
}
You can’t perform that action at this time.
0 commit comments