Skip to content

Add ERB lexer#1228

Merged
alecthomas merged 1 commit into
alecthomas:masterfrom
nelsonfigueroa:add-erb-lexer
Mar 13, 2026
Merged

Add ERB lexer#1228
alecthomas merged 1 commit into
alecthomas:masterfrom
nelsonfigueroa:add-erb-lexer

Conversation

@nelsonfigueroa

Copy link
Copy Markdown
Contributor

This PR adds support for embedded Ruby (ERB) which is commonly used in Ruby on Rails projects. Note that I used heavy assistance from Claude Code and tried to ensure it didn't generate slop to the best of my abilities. All tests are passing and I also visually verified the end result which looks solid to me.

Here's a screenshot that was generated by building the Chroma CLI with the ERB lexer and running it against the test data file with chroma --lexer=erb --style=monokai --html lexers/testdata/erb.actual

image

@alecthomas alecthomas merged commit 79e0fa7 into alecthomas:master Mar 13, 2026
2 checks passed
@alecthomas

Copy link
Copy Markdown
Owner

Thanks!

@nelsonfigueroa nelsonfigueroa deleted the add-erb-lexer branch March 13, 2026 22:02
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.

2 participants