Skip to content

Conversation

@DannyBen
Copy link
Member

@DannyBen DannyBen commented Feb 28, 2024

As discussed in #451 #374 #358 #216 #211 #210 #163 #73


This PR modifies the behavior of the indentation functions so that they ignore anything that is considered a heredoc block.

  1. Heredoc blocks start with any line that matches /<<-?\s*(\w+)/. When found, the following line onward will not be indented.
  2. Heredoc blocks end with any line that matches /^#{heredoc_marker}\n?$/

The Array#indent function has a higher than desired cognitive complexity, to be dealt with later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants