-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Currently the tokenizer considers the entire contents of text between the open bracket and closed bracket the "key", including any whitespace that may be surrounding the actual text.
This is inconsistent with other formatters and the formatter built into the C# compiler.
Eg: abc{ Replacement1 } outputs the key " Replacement1 ", when it should really be "Replacement1".
Additionally, spaces are currently allowed in the middle of keys, which throws an "Unexpected Token" error in the C# compiler's string interpolation.
Both of these behaviours should eventually be configurable with a user specified setting value.
Items:
- Write tests
- Implement whitespace trimming in the tokenizer (Thanks
Trim(ReadOnlySpan<Char>) - Implement whitespace detection in the key