Skip to content

Releases: marcoroth/herb

v0.8.5

18 Dec 11:41
f123882

Choose a tag to compare

Lexer/Parser

Linter

  • Account for meta[media] in html-no-duplicate-meta-names rule by @marcoroth in #958
  • Lowercase both opening/closing tag when fixing html-tag-name-lowercase offense by @kudoas in #976

Language Server

Engine

  • Ignore <%graphql %> tags when compiling templates by @marcoroth in #988

Documentation

  • Fix file name in Linter Custom Rules example code by @kozy4324 in #966

Dependencies

New Contributors

Commits

Full Changelog: v0.8.4...v0.8.5

v0.8.4

08 Dec 10:07
9722d34

Choose a tag to compare

Formatter

Linter

Language Server

  • Add Unnecessary diagnostic for <% case %> children by @marcoroth in #802

Engine

  • Add more tests for left and right ERB Trimming by @marcoroth in #650
  • Avoid applying debug spans inside javascript_tag blocks by @kozy4324 in #953

libherb

Documentation

Dependencies

  • Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #940
  • Bump @jothepro/doxygen-awesome-css from v2.3.4 to v2.4.1 by @dependabot[bot] in #924
  • Bump jws from 3.2.2 to 3.2.3 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #949

New Contributors

Commits

Full Changelog: v0.8.3...v0.8.4

v0.8.3

01 Dec 22:31
ff16d7f

Choose a tag to compare

Parser

  • Re-parse on unexpected ";" error for more accurate errors by @marcoroth in #902

Ruby

Engine

  • Fix incomplete Hash handling in error_formatter by @christos in #915

libherb

Dependencies

See all
  • Update glob and js-yaml by @dependabot[bot] in #897
  • Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/config by @dependabot[bot] in #918
  • Bump zod from 4.1.12 to 4.1.13 by @dependabot[bot] in #925
  • Bump playwright from 1.55.1 to 1.56.1 by @dependabot[bot] in #922
  • Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/linter by @dependabot[bot] in #919
  • Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/printer by @dependabot[bot] in #920
  • Bump typescript from 5.9.2 to 5.9.3 by @dependabot[bot] in #923
  • Bump glob from 11.1.0 to 13.0.0 in /javascript/packages/rewriter by @dependabot[bot] in #921
  • Bump body-parser from 2.2.0 to 2.2.1 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #927
  • Bump nx from 21.1.2 to 22.1.3 by @dependabot[bot] in #934
  • Bump monaco-editor from 0.52.2 to 0.55.1 by @dependabot[bot] in #936
  • Bump playwright from 1.56.1 to 1.57.0 by @dependabot[bot] in #935
  • Bump @typescript-eslint/eslint-plugin from 8.46.4 to 8.48.0 by @dependabot[bot] in #937
  • Bump express from 5.1.0 to 5.2.0 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #938

New Contributors

Commits

Full Changelog: v0.8.2...v0.8.3

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