Skip to content

fix: attribute location#1217

Merged
alexander-akait merged 1 commit intomainfrom
fix/attribute-location
Mar 19, 2026
Merged

fix: attribute location#1217
alexander-akait merged 1 commit intomainfrom
fix/attribute-location

Conversation

@jorgsowa
Copy link
Collaborator

Fixes #1125

  1. attribute start position was wrong — this.node("attribute") was called after consuming the name and args, so start = end (both captured at the post-read position). Fixed by capturing the node before reading anything.
  2. attrgroup end position was wrong — this.node("attrgroup")([]) was created and finalized immediately (before reading attrs or consuming ]), so start = end. Fixed by deferring finalization until after ] is consumed, giving the node its correct span.

@alexander-akait
Copy link
Collaborator

@jorgsowa let's rebase

@jorgsowa jorgsowa force-pushed the fix/attribute-location branch from d392c8c to 1403d37 Compare March 19, 2026 17:03
@alexander-akait alexander-akait merged commit ee242a5 into main Mar 19, 2026
6 checks passed
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.

attribute start and end loc are the same, and source is undefined

2 participants