Thursday, April 24, 2025

The Digital Press

All the Bits Fit to Print

Ruby Web Development Artificial Intelligence Urban Planning Astronomy

Herb: Fast, Precise HTML-Aware ERB Parsing Tool Unveiled

HTML-aware ERB parser offering error tolerance and real-time editing support

From Hacker News Original Article Hacker News Discussion

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.