diff --git a/spec/message.abnf b/spec/message.abnf index 04ad7c8fe..6c72deeb4 100644 --- a/spec/message.abnf +++ b/spec/message.abnf @@ -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 diff --git a/spec/syntax.md b/spec/syntax.md index 3376f65e2..0e1ed3ae0 100644 --- a/spec/syntax.md +++ b/spec/syntax.md @@ -168,9 +168,10 @@ and consists of: 1. an optional list of _declarations_, followed by 2. a _complex body_ +3. optional trailing whitespace ```abnf -complex-message = *(declaration [s]) complex-body +complex-message = *(declaration [s]) complex-body [s] ``` ### Declarations diff --git a/test/tests/syntax.json b/test/tests/syntax.json index 7206e9f06..1364ba565 100644 --- a/test/tests/syntax.json +++ b/test/tests/syntax.json @@ -409,6 +409,11 @@ "type": "unsupported-statement" } ] + }, + { + "src": "{{trailing whitespace}} \n", + "expCleanSrc": "trailing whitespace", + "exp": "trailing whitespace" } ] }