Skip to content

Commit

Permalink
fix(parser): simplify grammar for footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Zaunseder committed Jan 22, 2024
1 parent 30ee926 commit a48f589
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/commit.pest
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ scope = @{ "(" ~ ASCII_ALPHANUMERIC+ ~ ")" }

subject = @{ text_without_newline }

body = { NEWLINE{2, } ~ (!footer_start ~ ANY)+ }
body = { NEWLINE{2, } ~ (!footer ~ ANY)+ }

footer_start = @{ NEWLINE{2, } ~ PEEK_ALL ~ text_without_newline ~ EOI }

footer = @{ footer_start ~ ANY* }
footer = @{ NEWLINE{2, } ~ PEEK_ALL ~ text_without_newline ~ EOI ~ ANY* }

text_without_newline = { (!NEWLINE ~ ANY)+ }

0 comments on commit a48f589

Please sign in to comment.