-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes parsing of ERB comments without a space
The ERB parser we're using misparses comments of the form: <%# ... #> (no space between % and #) With a space the AST is: s(:erb, nil, nil, s(:code, " # this should not fail: ' "), nil) Without a space the AST is: s(:erb, s(:indicator, "#"), nil, s(:code, " this should not fail: ' "), nil) The latter AST causes a crash when parsing the `:code` node as Ruby. Works around the issue by transforming the latter AST to the former. Fixes #429
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters