Wrong syntax highlighting for <%==
erb syntax
#2909
Labels
bug
Something isn't working
help-wanted
Extra attention is needed
pinned
This issue or pull request is pinned and won't be marked as stale
vscode
This pull request should be included in the VS Code extension's release notes
Description
Ruby LSP Information
Details
VS Code Version
1.95.1
Ruby LSP Extension Version
0.8.14
Ruby LSP Server Version
0.22.1
Ruby LSP Addons
Ruby Version
3.3.6
Ruby Version Manager
rbenv
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
Reproduction steps
A lesser used but valid syntax of erb is
<%==
which will mark the passed string as html safe. Rails documents it at the bottom of https://guides.rubyonrails.org/active_support_core_extensions.html#safe-strings, although I'm not sure if this is rails specific or not. Could very well beerubi
only.ruby-lsp fails to consider the second equal sign, showing the code like this:
A fix seems rather straightforward but erb highlighting has no tests and I don't really understand these gramar files so I'm not very confident in my change. I can open a PR if it looks reasonable and no tests are fine.
Patch
The text was updated successfully, but these errors were encountered: