-
Notifications
You must be signed in to change notification settings - Fork 45
Forbid tabs as inline blanks #167
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
Conversation
# Partial Error (tab is not a valid indent) | ||
key04 = | ||
This line is indented by 4 spaces, | ||
whereas this line by 1 tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exhibits the same behavior as when a broken attribute is encountered. The body of the message up until the syntax error parses fine. Essentially, it's the same situation as:
key04 =
This line is indented by 4 spaces,
junk here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add the tab character back to text_char
.
That also means that one of the testcases should actually pass.
test/fixtures/tab.ftl
Outdated
@@ -0,0 +1,14 @@ | |||
# Error (tab after =) | |||
key01 = Value 01 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a success.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the tab be trimmed from the value or kept verbatim?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it makes sense to only trim syntax whitespace. I'd keep it.
test/fixtures/tab.ftl
Outdated
key01 = Value 01 | ||
|
||
# Error (tab before =) | ||
key02 = Value 02 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This failing is right, as are the ones below.
Thanks, @Pike. I made the tab character a |
Fix #165.