-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Automatic dedent FTW #5135
Comments
The feature is intentional (as you suspect), and was introduced some time before the Pkg2 rewrite if you want to dive and see if there was any discussion on how it should work. I want to say there was, but I'm falling asleep in my chair right now so won't be looking it up. May just need clearer docs? |
This seems like a misfeature to me....why should a literal string implicitly ignore whitespace? |
Because this is typically used to embed text within code and the code tends to be indented but you don't want the text to be indented. That leads to very awkward code where the string literals are flush left in the middle of indented code. Automatically dedenting the string literal content is very convenient. |
Okay... |
$ cat - <<-EOF
This feature is not unprecedented.
It has been implemented before in other contexts.
EOF |
Comment/re-open if there is a need to revisit this. |
Why was this closed? AFAICT, this is still undocumented. |
Ok. Can we just document it then and tell people to define their own R_str On Wed, Jan 14, 2015 at 11:40 AM, Steven G. Johnson <
|
Certainly we should document it. Introducing other macros seems like an orthogonal issue that should be debated elsewhere. |
This seems like a feature I could be friends with if it just introduced itself rather than jumping me in the park while I was walking home drunk.
The rule seems obscure: If you endquote on a line containing something then you get auto-dedent. If you endquote at the beginning of a newline then you don't dedent. Is that it?
To be clear, maybe you want a dedent quote
d"""
and the regular"""
doesn't dedent. Dedent. It's kind of fun to say. Dedent.The text was updated successfully, but these errors were encountered: