Allow trimming of whitespace

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-09 13:24:40 +01:00
parent 587cfdea53
commit 59f92e31fe
8 changed files with 243 additions and 9 deletions

View file

@ -0,0 +1,34 @@
---
source: tests/file_tests.rs
expression: parsed
input_file: tests/cases/trim_whitespace.nomo
---
ParsedTemplate {
tokens: [
[LeftDelim]"{{" (0..2),
[Whitespace]" " (2..3),
[ConditionalIf]"if" (3..5),
[Whitespace]" " (5..6),
[Ident]"test" (6..10),
[Whitespace]" " (10..11),
[TrimWhitespace]"-" (11..12),
[RightDelim]"}}" (12..14),
[Whitespace]"\n " (14..19),
[Content]"Hello" (19..24),
[Whitespace]" " (24..25),
[LeftDelim]"{{" (25..27),
[WantsOutput]"=" (27..28),
[Whitespace]" " (28..29),
[Ident]"stuff" (29..34),
[Whitespace]" " (34..35),
[TrimWhitespace]"-" (35..36),
[RightDelim]"}}" (36..38),
[Whitespace]"\n" (38..39),
[LeftDelim]"{{" (39..41),
[TrimWhitespace]"-" (41..42),
[Whitespace]" " (42..43),
[End]"end" (43..46),
[Whitespace]" " (46..47),
[RightDelim]"}}" (47..49),
],
}