Skip to content
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

Add support for using heredoc #496

Merged
merged 5 commits into from
Feb 28, 2024
Merged

Add support for using heredoc #496

merged 5 commits into from
Feb 28, 2024

Conversation

DannyBen
Copy link
Owner

@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.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant