Skip to content

Commit

Permalink
Allow trailing whitespace for complex messages (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli authored Jul 8, 2024
1 parent 5b71bd6 commit 661edfb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/message.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ simple-start = simple-start-char / escaped-char / placeholder
pattern = *(text-char / escaped-char / placeholder)
placeholder = expression / markup

complex-message = *(declaration [s]) complex-body
complex-message = *(declaration [s]) complex-body [s]
declaration = input-declaration / local-declaration / reserved-statement
complex-body = quoted-pattern / matcher

Expand Down
2 changes: 1 addition & 1 deletion spec/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ and consists of:
2. a _complex body_

```abnf
complex-message = *(declaration [s]) complex-body
complex-message = *(declaration [s]) complex-body [s]
```

### Declarations
Expand Down
5 changes: 5 additions & 0 deletions test/tests/syntax.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@
"type": "unsupported-statement"
}
]
},
{
"src": "{{trailing whitespace}} \n",
"expCleanSrc": "trailing whitespace",
"exp": "trailing whitespace"
}
]
}

0 comments on commit 661edfb

Please sign in to comment.