Skip to content

Location information is incorrect for multi-line ERB nodes #97

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

Open
marcoroth opened this issue May 2, 2025 · 0 comments
Open

Location information is incorrect for multi-line ERB nodes #97

marcoroth opened this issue May 2, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@marcoroth
Copy link
Owner

The location information for the content and tag_closing are incorrect if the content in a ERBContentNode is multiline.

Input:

<%=
  hello
%>

Parse Tree:

@ DocumentNode (location: (1:0)-(1:12))
├── errors: []
└── children: (1 item)
    └── @ ERBContentNode (location: (1:0)-(1:12))
        ├── errors: []
        ├── tag_opening: "<%=" (location: (1:0)-(1:3))
        ├── content: "
          hello
        " (location: (1:3)-(1:10))
        ├── tag_closing: "%>" (location: (1:10)-(1:12))
        ├── parsed: true
        └── valid: true
@marcoroth marcoroth added the bug Something isn't working label May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant