Thursday, April 24, 2025
All the Bits Fit to Print
HTML-aware ERB parser offering error tolerance and real-time editing support
Herb is a new HTML-aware parser for ERB templates that offers fast, error-tolerant, and precise parsing, improving developer tooling in Ruby and beyond.
Why it matters: Enables real-time, accurate parsing of mixed HTML and Ruby code, enhancing editor responsiveness and tooling accuracy.
The big picture: Built on Ruby's official Prism parser, Herb supports multiple languages with plans to expand beyond ERB templates.
Quick takeaway: Herb tracks precise character positions and preserves whitespace, making it ideal for debugging, linting, and language servers.
Commenters say: Users appreciate Herb's speed and robustness, hope for better documentation, and look forward to integrations with VS Code and linters.