Post

As announced at RubyKaigi today, I've been working on a new HTML-Aware ERB Parser that I just released today. Introducing Herb — a fast, modern, and HTML-aware ERB parser, designed from the ground up for smarter developer tooling. #rubykaigi #rubykaigi2025

22 reposts96 likes

I have been debating on that 😅 I personally settled with 'herb' to avoid confusion. But if it some point it could establish itself as a synonym I wouldn't be mad either 🙈

Thanks! 🙏🏼 I mean, I don't see why not. For the general purpose HTML templating language syntax tree it might actually make sense to implement a translation layer for brb too.

Awesome work Marco! Do you have any plans on making this a replacement for the rendering parser used by rails? I find it really annoying that I can't step into erb files with a debugger and I'm wondering if this approach might helper there.

I was looking into that, but couldn't immediately figure something out. But I'm sure it could improve the error page when you have a syntax error in your view file.

This looks great. I really wanted to explore the ability to have components similar to what Laravel Blade has, but I didn't want to use a regex (kluthu and all that). I explored Nokogiri for this but I really didn't want to lose line nums/etc, messing with stack traces. Herb might be it.