Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle whitespace padding around parameters #29

Open
2 of 3 tasks
crozone opened this issue Jul 22, 2021 · 0 comments
Open
2 of 3 tasks

Handle whitespace padding around parameters #29

crozone opened this issue Jul 22, 2021 · 0 comments
Labels
Milestone

Comments

@crozone
Copy link
Owner

crozone commented Jul 22, 2021

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
@crozone crozone added this to the 4.0 milestone Jul 22, 2021
@crozone crozone added the bug label Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant