You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #70.
The comment scanner was to greedy. In a way this bug always existed.
Comment-like patterns with a specific shape have always been scanned incorrectly in normal mode, e.g.
```ruby
/foo # \d
/
```
This was just very rare. Prior to the fix of issue #66 via PR #67, the comment scanner only fired for a limited, incomplete subset of valid comments like the one above. With the broadening of the scanner, this bug became much easier to hit upon.
In ruby's regexp,
/#(\d+)/
matches literal#
then unnamed capture(\d+)
.But
Regexp::Parser.parse
treats it as literal'#(\d+)'
.Regexp::Parser.parse('#(\d+)')
shoud return same tree asRegexp::Parser.parse('\#(\d+)')
(except for first node, it's"#"
instead of"\\#"
)The text was updated successfully, but these errors were encountered: