-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
caddyfile: Allow heredoc blank lines #6051
caddyfile: Allow heredoc blank lines #6051
Conversation
We need tests to cover this. |
I don't think it's valid to have partial whitespace on the line, that's weird. Also I don't think we should remove whitespace if they include it (the whitespace may be important to the user, it should be preserved). |
So what you're saying is no need to account for the fact where the blank line is not really empty but contains whitespaces? Also, I thought I am not removing any whitespaces as I am only checking for the output of the |
I think a heredoc indented with 2 tabs, having an "empty" line with only 1 tab, is not valid. I also think a heredoc with 2 tabs, having an "empty" line with 3 tabs is valid, and it should preserve that 1 tab as real text (after stripping the leading 2 tabs) |
df2fdd3
to
1b9d751
Compare
@francislavoie I think it should now cover the cases you mentioned. I also added test cases but please let me know if we need more. Thanks. |
1b9d751
to
b679958
Compare
All the feedback items above should now be resolved. Thank you for your prompt feedback @francislavoie! |
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.
Great, thanks!
Hmm, the CLA bot is down, I think. I guess we'll have to wait for it to wake up 😂 but that's fine |
Closes #6048
@francislavoie. This seemed quick, so I thought I would take a crack at it.