Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
f675cb5
Add Rubymine to list of Editors Herb Dev Tools (#538)
equivalent Sep 30, 2025
7249cd7
Linter: Implement `erb-comment-syntax` linter rule (#528)
domingo2000 Sep 30, 2025
5da59fc
C: Implement more efficient buffer resizing (#539)
timkaechele Sep 30, 2025
35124fc
Parser: Fix parsing boolean attributes with `track_whitespace` (#560)
marcoroth Oct 1, 2025
c5fb3ee
Linter: Add test case for trailing boolean attribute in HTML element …
dzunk Oct 1, 2025
8f9ee4a
Linter: fix rule generator template (#563)
domingo2000 Oct 1, 2025
6239048
Lexer: Support lexing and parsing `=%>` ERB closing tag (#568)
marcoroth Oct 2, 2025
8c17188
Linter: Implement `erb-right-trim` linter rule (#556)
domingo2000 Oct 2, 2025
69a4d97
Add `visitNode` and `visitERBNode` methods to improve `erb-right-trim…
marcoroth Oct 2, 2025
0e028d1
Linter Rule: Refactor `erb-require-whitespace-inside-tags` to use `vi…
marcoroth Oct 2, 2025
edf9358
docs: Add References section to `erb-comment-syntax` linter rule
marcoroth Oct 4, 2025
abaeeb7
C: Localize token struct members (#529)
timkaechele Oct 5, 2025
9517614
Linter: Fix `--version` flag for CLI (#488)
drewhoffer Oct 5, 2025
ea545ad
Formatter: Print `Experimental Preview` warning on `stderr` (#575)
marcoroth Oct 5, 2025
2ca92ab
Engine: Support Ruby Block Comments when compiling templates (#576)
marcoroth Oct 5, 2025
161fc18
Parser: Fix analysis of nested `case/when` and `case/in` parsing (#578)
marcoroth Oct 5, 2025
5067d4e
Parser: Analyze `case` statements with `yield` as `ERBCaseNode` (#577)
marcoroth Oct 5, 2025
2276a01
`v0.7.5`
marcoroth Oct 6, 2025
b4a8e35
Update `bin/setup` script
marcoroth Oct 6, 2025
caab4f1
Add `bin/publish_packages` script
marcoroth Oct 6, 2025
1af6962
C: Also call `analyze` in C-CLI `parse` command (#584)
marcoroth Oct 8, 2025
1f3ac1d
C: Favor explicit buffer capacity over default capacity (#585)
marcoroth Oct 8, 2025
b26978a
C: Remove JSON Serialize Implementation (#586)
marcoroth Oct 8, 2025
8d6adb1
Linter: Add test helpers to simplify linter rule tests (#587)
marcoroth Oct 8, 2025
79d1991
C: Split lexer/parser alloc and init into separate steps (#513)
timkaechele Oct 9, 2025
079dc43
Engine: Fix compiling `case/in` nodes in HTML+ERB templates (#596)
marcoroth Oct 9, 2025
892b6db
Formatter: Fix punctuation splitting and content duplication issues (…
marcoroth Oct 9, 2025
c2dd6ff
Formatter: Extract and refactor Format Helper Functions and Constants…
marcoroth Oct 9, 2025
223512d
Linter: Implement `erb-no-case-node-children` linter rule (#598)
marcoroth Oct 9, 2025
ff53bdb
Linter: Fix crash in `html-no-underscores-in-attribute-names` rule (#…
marcoroth Oct 9, 2025
4ce18f4
Add `stimulus-lint` to `.envrc`
marcoroth Oct 9, 2025
6035766
Bump Prism to `v1.5.2` (#603)
marcoroth Oct 9, 2025
2b236ff
C: Remove unused `html_util` functions (#607)
timkaechele Oct 10, 2025
f18082a
C: Remove unused functions from `util.c` (#606)
timkaechele Oct 10, 2025
8cbc7ff
Ruby: NTFS compliant snapshot filenames (#610)
timkaechele Oct 10, 2025
f49dee8
RuboCop
marcoroth Oct 10, 2025
f4f97aa
C: Remove `memory.c` implementation in preparation for arena allocato…
timkaechele Oct 10, 2025
860c798
Formatter: Better respect and deal with whitespace and adjacent text …
marcoroth Oct 10, 2025
89f027e
Linter: Don't lint files with parser errors (#614)
marcoroth Oct 10, 2025
4fc81bb
Linter: Implement `html-no-space-in-html-tag` linter rule (#559)
domingo2000 Oct 10, 2025
1913a5d
C: Use buffer for string operations in `html_utils.c` (#616)
timkaechele Oct 10, 2025
67573b9
Format
marcoroth Oct 10, 2025
47835a8
C: Remove superfluous `malloc` from `buffer_append_repeated` (#615)
timkaechele Oct 10, 2025
e899331
C: Use buffer in `escape_newlines` and `wrap_in_string` (#617)
timkaechele Oct 10, 2025
5c9980b
Docs: Exclude Maintainer and Dependabot from Contributors component
marcoroth Oct 10, 2025
bc9fb9a
C: Implement `hb_string` struct (#618)
timkaechele Oct 11, 2025
a005cd6
Update all HTML+ERB globs to include Action View Variants (#620)
marcoroth Oct 11, 2025
e4e330c
Ruby CLI: Run `compile` for all files in `analyze` command (#621)
marcoroth Oct 11, 2025
052f4a5
Linter: Support auto-fixing linter offenses using `--fix` (#622)
marcoroth Oct 11, 2025
dcc18cc
C: Implement rudimentary arena allocator `hb_arena.c` (#623)
timkaechele Oct 13, 2025
069e1f0
C: Make parser options a normal struct member of the parser (#625)
timkaechele Oct 13, 2025
c1636c7
Linter: Implement `erb-no-extra-newline` linter rule (#557)
domingo2000 Oct 13, 2025
3045b89
Playground: Add Herb Linter Autofix Button (#627)
marcoroth Oct 13, 2025
8bbaa2d
Linter: Fix false positive in `erb-right-trim` when using `<%-` (#629)
marcoroth Oct 13, 2025
1ac9e9c
Linter: Implement Autofix for `erb-right-trim` linter rule (#630)
marcoroth Oct 13, 2025
cc340b5
C: Namespace `hb_array` and `hb_buffer` and move to `src/util/` (#626)
marcoroth Oct 13, 2025
bd519ca
C: Remove unused functions from `hb_buffer.c` (#608)
timkaechele Oct 13, 2025
53a9b16
C: Make lexer source an instance of `hb_string_T` (#632)
timkaechele Oct 13, 2025
693f491
Parser: Allow `TOKEN_BACKSLASH` in HTML Text Content (#637)
marcoroth Oct 14, 2025
cd13bf7
Linter: Implement `html-input-require-autocomplete` linter rule (#565)
domingo2000 Oct 14, 2025
f2b3d78
Linter: Implement `html-body-only-elements` linter rule (#470)
nicogaldamez Oct 14, 2025
7034d38
C: Use `uint32_t` for `length` member in `hb_string_T` struct (#640)
timkaechele Oct 14, 2025
cf69125
Linter: Implement `html-head-only-elements` linter rule (#382)
marcoroth Oct 14, 2025
22242c9
Linter: Implement `html-no-duplicate-meta-names` linter rule (#383)
marcoroth Oct 14, 2025
fc4de2b
Linter Rule: Allow head-only elements on top level (#641)
marcoroth Oct 14, 2025
d1fc886
Linter: Implement Autofix for `html-no-space-in-tag` linter rule (#642)
marcoroth Oct 14, 2025
ec41500
Linter Rule: Fix false positive for `yield` in `erb-right-trim` rule …
marcoroth Oct 14, 2025
86efa79
Linter Rule: Remove `Trimming with -%> on non-output` offense (#645)
marcoroth Oct 15, 2025
8580949
C: Add `hb_buffer_append_string` function to `hb_buffer_T` (#657)
timkaechele Oct 16, 2025
d5afc84
Linter: Rename `erb-require-trailing-newline` linter rule (#660)
marcoroth Oct 16, 2025
9142a38
Linter: Allow disabling offenses using `<%# herb:disable %>` (#531)
domingo2000 Oct 16, 2025
da1c31d
Bump Prism to `v1.6.0` (#669)
marcoroth Oct 16, 2025
a2117a4
C: Implement `hb_string_slice` function (#661)
timkaechele Oct 16, 2025
a2de431
Core: Introduce `HERB_FILES_GLOB` to share HTML+ERB glob (#672)
marcoroth Oct 17, 2025
e74424d
C: Use Arena Allocator in `hb_string_to_c_string` function (#674)
timkaechele Oct 17, 2025
256c746
C: Use `hb_string_T` in `lexer_peek_helpers.c` (#656)
timkaechele Oct 17, 2025
a7f5b75
C: Inline `size_t_to_string` function (#676)
timkaechele Oct 18, 2025
bdf595b
C: Use `hb_string_T` in `herb_analyze` function (#678)
timkaechele Oct 18, 2025
1075f63
C: Remove unused `pretty_print_analyzed_ruby` (#679)
timkaechele Oct 18, 2025
dac2595
C: Make `is_newline` function legible (#682)
timkaechele Oct 19, 2025
e3b7291
Lexer: Handle Memory Leak in `lexer_parse_erb_content` (#690)
marcoroth Oct 19, 2025
788e828
Parser: Handle memory leak in `herb_parse` (#691)
marcoroth Oct 19, 2025
4f13172
C: Use `hb_string_T` in `parser_check_matching_tag` function (#689)
timkaechele Oct 19, 2025
e029458
C: Rename `parser_free` to `herb_parser_deinit` (#692)
timkaechele Oct 19, 2025
4443caf
C: Use `hb_string_T` in `quoted_string` function (#681)
timkaechele Oct 19, 2025
a95487e
CI: Update trigger to run `build.yml` on pull requests
marcoroth Oct 19, 2025
de7a5ef
C: Use `hb_string_T` in `parser_is_foreign_content_tag` function (#688)
timkaechele Oct 19, 2025
f33e0ba
Herb: Upgrade to LLVM 21 and Clang 21 (#694)
marcoroth Oct 19, 2025
e3a4e86
C: Migrate `is_void_element` to `hb_string_T` (#686)
timkaechele Oct 19, 2025
e9ba568
C: Use `hb_string_T` in `parser_helpers.c` functions (#696)
timkaechele Oct 20, 2025
b858371
Linter: Remove `html-no-space-in-tag` from default rules for now (#697)
marcoroth Oct 20, 2025
34d352a
VS Code: Only show `Report Issue` Code Action for Herb Diagnostics (#…
marcoroth Oct 20, 2025
f92b7db
Bump playwright from 1.55.0 to 1.55.1 in the npm_and_yarn group acros…
dependabot[bot] Oct 20, 2025
d6ddd24
Bump vite from 7.1.8 to 7.1.11 in the npm_and_yarn group across 1 dir…
dependabot[bot] Oct 20, 2025
81825b5
C: Use `hb_string_T` in `html_util.c` functions (#703)
timkaechele Oct 20, 2025
a9e6376
C: Rename `hb_string_from_c_string` to `hb_string` (#706)
marcoroth Oct 20, 2025
681e322
C: Move `hb_arena.c` to `src/util/` (#707)
marcoroth Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export PATH="$PWD/javascript/packages/printer/bin:$PATH"
export PATH="$PWD/javascript/packages/formatter/bin:$PATH"
export PATH="$PWD/javascript/packages/language-server/bin:$PATH"
export PATH="$PWD/javascript/packages/highlighter/bin:$PATH"
export PATH="$PWD/javascript/packages/stimulus-lint/bin:$PATH"
2 changes: 1 addition & 1 deletion .github/workflows/build-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Add LLVM apt Repo
run: |-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 main"
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-21 main"
sudo apt update

- name: Install APT dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

on: [push]
on: [push, pull_request]

permissions:
contents: read
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Add LLVM apt Repo
run: |-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 main"
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-21 main"
sudo apt update

- name: Install APT dependencies
Expand Down Expand Up @@ -57,13 +57,13 @@ jobs:
run: ./run_herb_tests

- name: clang-format version
run: clang-format-19 --version
run: clang-format-21 --version

- name: Lint
run: bin/lint

- name: clang-tidy version
run: clang-tidy-19 --version
run: clang-tidy-21 --version

- name: Tidy
run: bin/tidy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Add LLVM apt Repo
run: |-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 main"
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-21 main"
sudo apt update

- name: Install APT dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Add LLVM apt Repo
run: |-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 main"
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-21 main"
sudo apt update

- name: Install APT dependencies
Expand Down
6 changes: 3 additions & 3 deletions Aptfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
check
clang-19
clang-format-19
clang-tidy-19
clang-21
clang-format-21
clang-tidy-21
emscripten
doxygen
xvfb
2 changes: 1 addition & 1 deletion Brewfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

brew "check"
brew "llvm@19" # for clang, clang-format and clang-tidy
brew "llvm@21" # for clang, clang-format and clang-tidy
brew "emscripten"
brew "doxygen"
15 changes: 7 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Pull request, bug reports, and any other forms of contribution are welcomed and highly encouraged.

If you encounter any issues when following along with this file please dont hesitate to reach out and file an issue!
If you encounter any issues when following along with this file please don't hesitate to reach out and file an issue!

## Running Locally

### Requirements

- [**Check**](https://libcheck.github.io/check/): For unit testing.
- [**Clang 19**](https://clang.llvm.org): The compiler used to build this project.
- [**Clang Format 19**](https://clang.llvm.org/docs/ClangFormat.html): For formatting the project.
- [**Clang Tidy 19**](https://clang.llvm.org/extra/clang-tidy/): For linting the project.
- [**Prism Ruby Parser v1.5.1**](https://github.com/ruby/prism/releases/tag/v1.5.1): We use Prism for Parsing the Ruby Source Code in the HTML+ERB files.
- [**Clang 21**](https://clang.llvm.org): The compiler used to build this project.
- [**Clang Format 21**](https://clang.llvm.org/docs/ClangFormat.html): For formatting the project.
- [**Clang Tidy 21**](https://clang.llvm.org/extra/clang-tidy/): For linting the project.
- [**Prism Ruby Parser v1.6.0**](https://github.com/ruby/prism/releases/tag/v1.6.0): We use Prism for Parsing the Ruby Source Code in the HTML+ERB files.
- [**Ruby**](https://www.ruby-lang.org/en/): We need Ruby as a dependency for `bundler`.
- [**Bundler**](https://bundler.io): We are using `bundler` to build [`prism`](https://github.com/ruby/prism) from source so we can build `herb` against it.
- [**Emscripten**](https://emscripten.org): For the WebAssembly build of `libherb` so it can be used in the browser using the [`@herb-tools/browser`](https://github.com/marcoroth/herb/blob/main/javascript/packages/browser) package.
Expand All @@ -27,7 +27,7 @@ xargs sudo apt-get install < Aptfile
or:

```bash
sudo apt-get install check clang-19 clang-tidy-19 clang-format-19 emscripten doxygen
sudo apt-get install check clang-21 clang-tidy-21 clang-format-21 emscripten doxygen
```

##### For macOS (using Homebrew)
Expand All @@ -38,7 +38,7 @@ brew bundle
or:

```bash
brew install check llvm@19 emscripten doxygen
brew install check llvm@21 emscripten doxygen
```

### Building
Expand Down Expand Up @@ -73,7 +73,6 @@ The `herb` executable exposes a few commands for interacting with `.html.erb` fi
Herb 🌿 Powerful and seamless HTML-aware ERB parsing and tooling.

./herb lex [file] - Lex a file
./herb lex_json [file] - Lex a file and return the result as json.
./herb parse [file] - Parse a file
./herb ruby [file] - Extract Ruby from a file
./herb html [file] - Extract HTML from a file
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"

gemspec

gem "prism", github: "ruby/prism", tag: "v1.5.1"
gem "prism", github: "ruby/prism", tag: "v1.6.0"

gem "actionview", "~> 8.0"
gem "lz_string"
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ GIT

GIT
remote: https://github.com/ruby/prism.git
revision: 23f16d31a7c57c4b927e1e3ec8f1281b45e7cb9f
tag: v1.5.1
revision: 2924f8f8832d57def7895cd7e2cc199ee58b3a3b
tag: v1.6.0
specs:
prism (1.5.1)
prism (1.6.0)

PATH
remote: .
specs:
herb (0.7.4)
herb (0.7.5)

GEM
remote: https://rubygems.org/
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ shared_flags = $(production_flags) $(shared_library_flags) $(prism_flags)
ifeq ($(os),Linux)
test_cflags = $(test_flags) -I/usr/include/check
test_ldflags = -L/usr/lib/x86_64-linux-gnu -lcheck -lm -lsubunit $(prism_ldflags)
cc = clang-19
clang_format = clang-format-19
clang_tidy = clang-tidy-19
cc = clang-21
clang_format = clang-format-21
clang_tidy = clang-tidy-21
endif

ifeq ($(os),Darwin)
brew_prefix := $(shell brew --prefix check)
test_cflags = $(test_flags) -I$(brew_prefix)/include
test_ldflags = -L$(brew_prefix)/lib -lcheck -lm $(prism_ldflags)
llvm_path = $(shell brew --prefix llvm@19)
llvm_path = $(shell brew --prefix llvm@21)
cc = $(llvm_path)/bin/clang
clang_format = $(llvm_path)/bin/clang-format
clang_tidy = $(llvm_path)/bin/clang-tidy
Expand Down
13 changes: 11 additions & 2 deletions bin/leaks_parse
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: $0 <file>"
echo "Usage: $0 <file_or_directory>"
exit 1
fi

Expand All @@ -10,4 +10,13 @@ if [[ "$(uname)" != "Darwin" ]]; then
exit 0
fi

leaks --atExit -- ./herb parse "$1"
TARGET="$1"

if [ -d "$TARGET" ]; then
while IFS= read -r -d '' file; do
echo "Checking $file for leaks..."
leaks --atExit -- ./herb parse "$file" --silent || exit 1
done < <(find "$TARGET" -name "*.html.erb" -type f -print0)
else
leaks --atExit -- ./herb parse "$TARGET" --silent
fi
25 changes: 25 additions & 0 deletions bin/publish_packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -euo pipefail

echo "Building all packages..."
yarn nx run-many -t build --all

echo "Running tests in all packages..."
yarn nx run-many -t test --all

for package_dir in javascript/packages/*; do
if [ -d "$package_dir" ] && [ -f "$package_dir/package.json" ]; then
package=$(basename "$package_dir")

if [ "$package" = "vscode" ]; then
echo "Skipping vscode package..."
continue
fi

echo "Publishing $package..."
(cd "$package_dir" && yarn publish)
fi
done

echo "All packages published successfully!"
6 changes: 4 additions & 2 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

set -e # Exit on error

make prism
make all
bundle install
bundle exec rake templates
yarn install
yarn build
28 changes: 14 additions & 14 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ errors:
arguments:
- token_type_to_string(found->type)
- token_type_to_string(expected_type)
- found->location->start->line
- found->location->start->column
- found->location.start.line
- found->location.start.column

fields:
- name: expected_type
Expand All @@ -49,8 +49,8 @@ errors:
template: "Found closing tag `</%s>` at (%zu:%zu) without a matching opening tag."
arguments:
- closing_tag->value
- closing_tag->location->start->line
- closing_tag->location->start->column
- closing_tag->location.start.line
- closing_tag->location.start.column

fields:
- name: closing_tag
Expand All @@ -61,8 +61,8 @@ errors:
template: "Opening tag `<%s>` at (%zu:%zu) doesn't have a matching closing tag `</%s>`."
arguments:
- opening_tag->value
- opening_tag->location->start->line
- opening_tag->location->start->column
- opening_tag->location.start.line
- opening_tag->location.start.column
- opening_tag->value

fields:
Expand All @@ -74,11 +74,11 @@ errors:
template: "Opening tag `<%s>` at (%zu:%zu) closed with `</%s>` at (%zu:%zu)."
arguments:
- opening_tag->value
- opening_tag->location->start->line
- opening_tag->location->start->column
- opening_tag->location.start.line
- opening_tag->location.start.column
- closing_tag->value
- closing_tag->location->start->line
- closing_tag->location->start->column
- closing_tag->location.start.line
- closing_tag->location.start.column

fields:
- name: opening_tag
Expand All @@ -93,8 +93,8 @@ errors:
arguments:
- opening_quote->value
- closing_quote->value
- closing_quote->location->start->line
- closing_quote->location->start->column
- closing_quote->location.start.line
- closing_quote->location.start.column

fields:
- name: opening_quote
Expand Down Expand Up @@ -127,8 +127,8 @@ errors:
template: "Tag `<%s>` opened at (%zu:%zu) was never closed before the end of document."
arguments:
- opening_tag->value
- opening_tag->location->start->line
- opening_tag->location->start->column
- opening_tag->location.start.line
- opening_tag->location.start.column

fields:
- name: opening_tag
Expand Down
5 changes: 4 additions & 1 deletion docs/.vitepress/theme/components/GitHubContributors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const error = ref(null)

onMounted(async () => {
try {
contributors.value = contributorsFile.slice(0, props.limit)
const excludedUsernames = ['marcoroth', 'dependabot[bot]']
const filteredContributors = contributorsFile.filter(contributor => !excludedUsernames.includes(contributor.login))
contributors.value = filteredContributors.slice(0, props.limit)

loading.value = false
} catch (err) {
error.value = `Failed to load contributors data for ${props.owner}/${props.repo}. Make sure the data file exists.`
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/transformers/herb-linter-transformer.mts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ function createCustomTwoslashFunction(optionse) {
return (code, lang, options) => {
let fileName = undefined

// kinda of a hack to make sure we pass a `fileName` for the `erb-requires-trailing-newline` rule
// kind of a hack to make sure we pass a `fileName` for the `erb-require-trailing-newline` rule
if (code.includes('▌')) {
fileName = "erb-requires-trailing-newline.html.erb"
fileName = "erb-require-trailing-newline.html.erb"
}

if (!lang || !['erb', 'html'].includes(lang)) {
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"fetch:contributors": "mkdir -p .vitepress/data/ && gh api -X get https://api.github.com/repos/marcoroth/herb/contributors > .vitepress/data/contributors.json"
},
"dependencies": {
"@herb-tools/browser": "0.7.4",
"@herb-tools/core": "0.7.4",
"@herb-tools/node": "0.7.4"
"@herb-tools/browser": "0.7.5",
"@herb-tools/core": "0.7.5",
"@herb-tools/node": "0.7.5"
},
"devDependencies": {
"@shikijs/vitepress-twoslash": "^3.4.2",
Expand Down
7 changes: 7 additions & 0 deletions examples/block_comment.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<%
=begin %>
This, while unusual, is a legal form of commenting.
<%
=end %>

<div>Content</div>
6 changes: 6 additions & 0 deletions examples/case_in.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<% case {} %>
<% in {} %>
"matched"
<% else %>
"not matched"
<% end %>
1 change: 1 addition & 0 deletions examples/complete_erb.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= hello %>
1 change: 1 addition & 0 deletions examples/incomplete_erb.invalid.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= hello
1 change: 1 addition & 0 deletions ext/herb/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
prism_include_path = "#{prism_path}/include"

$VPATH << "$(srcdir)/../../src"
$VPATH << "$(srcdir)/../../src/util"
$VPATH << prism_src_path
$VPATH << "#{prism_src_path}/util"

Expand Down
Loading
Loading