Skip to content

Commit

Permalink
Minor cleanup of the parser grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
alberti42 committed Aug 17, 2024
1 parent 9514c97 commit b2d6d18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generateParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ multiline_rev_after
= $(!separator_line text_line)+
close_card
= $(multiline_before_close? f:close_line e:(multiline_after_close)? e1:(newline annotation)?) {
= $(multiline_before_close? close_line (multiline_after_close)? (newline annotation)?) {
return createParsedQuestionInfo(CardType.Cloze,text().trim(),location().start.line-1,location().end.line-1);
}
Expand Down Expand Up @@ -217,6 +217,7 @@ nonempty_text_line
text_line
= @$[^\\n]* newline
// very likely, it is possible to homogeneize/modify the rules to use only either 'text_line1' or 'text_line'
text_line1
= newline @$[^\\n]*
Expand Down

0 comments on commit b2d6d18

Please sign in to comment.