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

Make node_for_line return the last possible node when nothing matches #456

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

MaxLap
Copy link
Contributor

@MaxLap MaxLap commented Nov 29, 2023

Bitten by HAML's parser anoying behavior of just merging lines into one without leaving any trace!

I fixed a problem in line_numbers when I made the RuboCop refactor, so the line count was more accurate. But that highlighted the lack of handling for multiline scripts in that method.

I'm patching node_for_line because managing to make line_numbers more accurate would require quite a bit of monkey-patching or probably mean a performance hit for something that is quite rarely needed.

Fixes #451

@sds sds merged commit b43635f into sds:main Dec 13, 2023
@sds sds added the bug label Dec 13, 2023
@sds
Copy link
Owner

sds commented Dec 13, 2023

Thank you!

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

Successfully merging this pull request may close these issues.

haml-lint:disable is ignored when line breaks on commas are present
2 participants