Skip to content

Commit 661edfb

Browse files
authored
Allow trailing whitespace for complex messages (#812)
1 parent 5b71bd6 commit 661edfb

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

spec/message.abnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ simple-start = simple-start-char / escaped-char / placeholder
55
pattern = *(text-char / escaped-char / placeholder)
66
placeholder = expression / markup
77

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

spec/syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ and consists of:
170170
2. a _complex body_
171171

172172
```abnf
173-
complex-message = *(declaration [s]) complex-body
173+
complex-message = *(declaration [s]) complex-body [s]
174174
```
175175

176176
### Declarations

test/tests/syntax.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,11 @@
409409
"type": "unsupported-statement"
410410
}
411411
]
412+
},
413+
{
414+
"src": "{{trailing whitespace}} \n",
415+
"expCleanSrc": "trailing whitespace",
416+
"exp": "trailing whitespace"
412417
}
413418
]
414419
}

0 commit comments

Comments
 (0)