From d97ce7eab81a64a5d40d22f515f61537ae9bc3b9 Mon Sep 17 00:00:00 2001 From: Daniel Bartholomae Date: Tue, 23 Aug 2022 16:01:39 +0200 Subject: [PATCH] Add test for handling trailing whitespaces --- src/diagrams/c4/parser/flow.spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/diagrams/c4/parser/flow.spec.js b/src/diagrams/c4/parser/flow.spec.js index 8d76efd9f..3d2bb97df 100644 --- a/src/diagrams/c4/parser/flow.spec.js +++ b/src/diagrams/c4/parser/flow.spec.js @@ -40,4 +40,13 @@ Person(customerA, "Banking Customer A", "A customer of the bank, with personal b wrap: false, }); }); + + it('should handle a trailing whitespaces after statements', function () { + const whitespace = ' '; + const rendered = flow.parser.parse(`C4Context${whitespace} +title System Context diagram for Internet Banking System${whitespace} +Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")${whitespace}`); + + expect(rendered).toBe(true); + }); });