News for hackers. Stuff that matters.
Re:C# Raw String Literal Proposal by LandR on Thursday February 17, 2022 @09:17AM (#30373265)
Doesn't heredoc preserve the indentation unless you strip it back out ? I don't mean identation within the string, I mean level of indentation of where it is in the code
Re:C# Raw String Literal Proposal by sandreas on Thursday February 17, 2022 @09:28AM (#30373390)
You can use it without indentication using <<- AND TAB (does not work with spaces, so copy and past won't work on hackernews - replace the spaces of the three content lines with a TAB):

  cat <<-EOF
   content
   not
   indented
   EOF
Re:C# Raw String Literal Proposal by jimworm on Thursday February 17, 2022 @09:27AM (#30373369)
The perl-family heredoc syntax could be quite flexible with options. I'm used to ruby which does have an option for indent-stripping.