Skip to content

Commit

Permalink
fixed dtext parsing headers with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
clragon committed Jun 5, 2024
1 parent 8b888dd commit f7b737f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/markup/data/grammar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,12 @@ class DTextGrammar extends GrammarDefinition<DTextElement> {

Parser<DTextElement> header() => (
(
char(' ').star(),
charIgnoringCase('h'),
pattern('1-6').map(int.parse),
char('.'),
char(' ').star(),
).toSequenceParser().map((e) => e.$2),
).toSequenceParser().map((e) => e.$3),
condense(
ref0(textElement)
.starLazy([
Expand Down

0 comments on commit f7b737f

Please sign in to comment.