Skip to content

Releases: marcoroth/herb

v0.8.2

18 Nov 00:53
7c6cd43

Choose a tag to compare

Formatter

Linter

Playground

Internal

  • Setup Automated publishing for JavaScript and Rust and rework Ruby by @marcoroth in #888

libherb

  • Use hb_array_first and hb_array_last consistently by @timkaechele in #884
  • Add hb_buffer_init_arena for allocating a buffer using the arena allocator by @timkaechele in #862

Commits

Full Changelog: v0.8.1...v0.8.2

v0.8.1

14 Nov 12:06
85576fe

Choose a tag to compare

Parser

  • Fix nested control structures in case/else clauses by @marcoroth in #869
  • Use location-based detection for ERB control types by @marcoroth in #871

Formatter

  • Fix whitespace preservation around ERB tags and punctuation by @marcoroth in #864

Linter

  • Linter Rule: Don't flag meta[itemprop] for html-head-only-elements by @marcoroth in #867

libherb

Rust

Commits

Full Changelog: v0.8.0...v0.8.1

v0.8.0

12 Nov 15:56
4a6c966

Choose a tag to compare

Herb v0.8

Check out the "What's new in Herb v0.8" post on the Herb Blog.

Herb v0 8 0

New Packages

Core

  • Add didyoumean and levenshtein utils by @marcoroth in #734
  • Add short-hand to construct Location, Position, and Range by @marcoroth in #731
  • Introduce HERB_FILES_GLOB to share HTML+ERB glob by @marcoroth in #672
  • Update all HTML+ERB globs to include Action View Variants by @marcoroth in #620

Parser

Engine

Formatter

  • Better respect and deal with whitespace and adjacent text by @marcoroth in #612
  • Extract and refactor Format Helper Functions and Constants by @marcoroth in #597
  • Fix Bug where case children were lost by @marcoroth in #756
  • Fix formatting <% else %> in inline mode by @marcoroth in #809
  • Fix punctuation splitting and content duplication issues by @marcoroth in #591
  • Improve tailwind-class-sorter rewriter experience by @marcoroth in #848
  • Improve text content formatting and whitespace preservation by @marcoroth in #823
  • Improve whitespace formatting on the root-level by @marcoroth in #763
  • Integrate tailwind-css-sorter rewriter by @marcoroth in #761
  • Preserve Frontmatter when formatting documents by @marcoroth in #797
  • Skip formatting Scaffold Templates by @marcoroth in #771
  • Try to persist <%# herb:disable %> nodes when formatting by @marcoroth in #762
  • Allow Linter and Formatter CLIs to accept multiple inputs by @marcoroth in #807

Linter

  • Add support for defining custom Linter rules by @marcoroth in #600
  • Add test helpers to simplify linter rule tests by @marcoroth in #587
  • Allow disabling offenses using <%# herb:disable %> by @domingo2000 in #531
  • Allow multiple rules to be ignored using <%# herb:disable %> by @domingo2000 in #680
  • Don't lint files with parser errors by @marcoroth in #614
  • Exclude Action Mailer views for html-no-self-closing by @marcoroth in #765
  • Fix html-no-empty-attributes with top-level control flow by @marcoroth in #796
  • Fix crash in html-no-underscores-in-attribute-names rule by @marcoroth in #602
  • Fix false positive in erb-right-trim when using <%- by @marcoroth in #629
  • Remove html-no-space-in-tag from default rules for now by @marcoroth in #697
  • Rename erb-require-trailing-newline linter rule by @marcoroth in #660
  • Support auto-fixing linter offenses using --fix by @marcoroth in #622
  • Allow Linter and Formatter CLIs to accept multiple inputs by @marcoroth in #807

Linter Rules

New Rules
Other Updates
Autofixes
  • Implement Aufofix for erb-comment-syntax rule by @marcoroth in #775
  • Implement Autofix for erb-right-trim linter rule by @marcoroth in #630
  • Implement Autofix for html-no-space-in-tag linter rule by @marcoroth in #642

Language Server

Dev Tools

Playground

Rewriter

  • Implement tailwind-class-sorter built-in rewriter by @marcoroth in #760
  • Change rewrite/rewriteString to be synchronous by @marcoroth in #787
  • Expose rewrite/rewriteString functions and refine types by @marcoroth in #786

Ruby

Rust

  • Add Herb Rust FFI Binding...
Read more

v0.7.5

06 Oct 04:11
ea7b342

Choose a tag to compare

Added

  • Lexer: Support lexing and parsing =%> ERB closing tag by @marcoroth in #568
  • Engine: Support Ruby Block Comments when compiling templates by @marcoroth in #576

New Linter Rules

Changed

  • Dev Tools: Add Rubymine to list of Editors by @equivalent in #538
  • C: Implement more efficient buffer resizing by @timkaechele in #539
  • C: Localize token struct members by @timkaechele in #529
  • Linter: Add test case for trailing boolean attribute in HTML element by @dzunk in #485
  • Linter: Add visitNode and visitERBNode methods to improve erb-right-trim by @marcoroth in #569
  • Linter: Refactor erb-require-whitespace-inside-tags to use visitERBNode by @marcoroth in #570

Fixed

  • Parser: Fix parsing boolean attributes with track_whitespace by @marcoroth in #560
  • Parser: Fix analysis of nested case/when and case/in parsing by @marcoroth in #578
  • Parser: Analyze case statements with yield as ERBCaseNode by @marcoroth in #577
  • Linter: fix rule generator template by @domingo2000 in #563
  • Linter: Fix --version flag for CLI by @drewhoffer in #488
  • Formatter: Print Experimental Preview warning on stderr by @marcoroth in #575

Documentation

  • docs: Fix link for html-no-self-closing rule in README by @koddsson in #535

Dependencies

  • Bump tar-fs from 2.1.3 to 2.1.4 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #536

New Contributors

Commits

Full Changelog: v0.7.4...v0.7.5

v0.7.4

26 Sep 14:55
db80db2

Choose a tag to compare

Changed

Fixed

  • Engine: Add missing newline when compiling <% # comment %> by @marcoroth in #530
  • Parser: Namespace Parser C functions by @indirect in #534

New Contributors

Commits

Full Changelog: v0.7.3...v0.7.4

v0.7.3

23 Sep 10:37
790653e

Choose a tag to compare

Changed

  • Parser: Analyze parse errors as partial_script by @Earlopain in #503
  • Rubygem: Add missing files and vendor Prism to allow compiling gem from source by @marcoroth in #515
  • Parser: Don't treat guard clauses as ERBIfNode or ERBUnlessNode by @marcoroth in #517
  • Linter: Allow empty data attributes with no value by @marcoroth in #518

Fixed

  • Parser: Add TOKEN_BACKTICK to list of text content tokens by @koddsson in #468
  • Parser: Fix typo in pretty_print_analyzed_ruby method by @timkaechele in #512
  • Formatter: Fix attribute spacing in content-preserving elements by @marcoroth in #522
  • Formatter: Add spaces in ERBContentNode within HTML attributes by @marcoroth in #523

Documentation

Dependencies

  • Bump the npm_and_yarn group across 1 directory with 2 updates by @dependabot[bot] in #516
  • Bump vite from 7.0.7 to 7.1.5 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #519
  • Bump vite from 7.1.5 to 7.1.6 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #520
  • Bump vite from 7.1.6 to 7.1.7 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #521

New Contributors

Commits

Full Changelog: v0.7.2...v0.7.3

v0.7.2

17 Sep 02:00
44ca9b7

Choose a tag to compare

Added

  • Formatter: Add --indent-width and --max-line-length args to the CLI by @LucasKuhn in #466
  • Engine: Add visitors for modifying AST before compiling by @marcoroth in #502

Changed

Fixed

  • Use rb_utf8_str_new_cstr() in Ruby C-Extension by @marcoroth in #500
  • Remove double HTML-escaping from error template by @coorasse in #487
  • Parser: Fix <div foo=>bar</div> skipping over the closing bracket from the opening div by @Earlopain in #501

New Contributors

Commits

Full Changelog: v0.7.1...v0.7.2

v0.7.1

14 Sep 20:42
bda6fd1

Choose a tag to compare

Changed

Dependencies

  • Bump Prism to v1.5.1 by @marcoroth in #495
  • Bump vite from 6.3.5 to 6.3.6 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #493

Commits

Full Changelog: v0.7.0...v0.7.1

v0.7.0

05 Sep 09:53
d3c284d

Choose a tag to compare

New Packages

  • Implement @herb-tools/dev-tools package for visual debug tools @marcoroth in #472
  • Implement stimulus-lint package using Herb Parser and Linter by @marcoroth in #457

Added

New Linter Rules

  • Implement html-no-empty-attributes linter rule by @auslach in #460
  • Implement html-no-underscores-in-attribute-names linter rule by @mickeytgl in #446

Changed

  • Ruby CLI: Squelch Processing output when silent is passed in by @mickeytgl in #464
  • Linter: Use --github by default in GitHub Actions by @marcoroth in #450
  • Linter: Show highlighted offense preview in GitHub Actions annotations by @marcoroth in #451
  • Linter: Remove no-title-attribute and navigation-has-label from default rules by @marcoroth in #456
  • Add printer version to CLI in formatter --version command by @auslach in #454

Fixed

Internal

New Contributors

Commits

Full Changelog: v0.6.1...v0.7.0

v0.6.1

26 Aug 17:10
ab76a9f

Choose a tag to compare

Added

  • Linter: Introduce ControlFlowTrackingVisitor to handle control flow by @marcoroth in #444
  • Printer: Introduce ERBToRubyStringPrinter to convert ERB to Ruby by @marcoroth in #434

Changed

  • Printer: Move IdentityPrinter implementation out of Printer by @marcoroth in #435
  • Printer: Also fully reconstruct whitespace in HTMLCloseTag by @marcoroth in #443

Fixed

  • Formatter: Add support for Content Preserving Elements by @marcoroth in #438
  • Formatter: Improve ERB Comment Rendering by @marcoroth in #439
  • Linter: Allow self-closing tags in SVG (html-no-self-closing) by @marcoroth in #442
  • Linter: Fix html-no-duplicate-ids rule with duplicate IDs in Control Flow by @marcoroth in #444

Commits

Full Changelog: v0.6.0...v0.6.1