Skip to content

Engine: Add parser_options passthrough and engine config support#1657

Merged
marcoroth merged 1 commit into
mainfrom
engine-parser-options
Apr 20, 2026
Merged

Engine: Add parser_options passthrough and engine config support#1657
marcoroth merged 1 commit into
mainfrom
engine-parser-options

Conversation

@marcoroth

@marcoroth marcoroth commented Apr 20, 2026

Copy link
Copy Markdown
Owner

This pull request adds parser_options passthrough support to Herb::Engine and makes engine options configurable via .herb.yml.

Previously, parser options like strict had to be individually wired through the engine as dedicated properties. Now, any parser option can be passed through directly:

Herb::Engine.new(template, parser_options: { strict: false, render_nodes: true })

Engine options can also be configured at the project level in .herb.yml:

  engine:
    debug: true
    optimize: true
    parser_options:
      strict: false

The priority chain is: per-call properties > .herb.yml config > parser defaults.

Additionally, debug now reads from .herb.yml configuration like optimize already does.

Resolves #1102

@pkg-pr-new

pkg-pr-new Bot commented Apr 20, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/@herb-tools/formatter@1657
npx https://pkg.pr.new/@herb-tools/language-server@1657
npx https://pkg.pr.new/@herb-tools/linter@1657

commit: 2c1ea66

@github-actions

github-actions Bot commented Apr 20, 2026

Copy link
Copy Markdown

🌿 Interactive Playground and Documentation Preview

A preview deployment has been built for this pull request. Try out the changes live in the interactive playground:


🌱 Grown from commit 2c1ea66


✅ Preview deployment has been cleaned up.

@marcoroth marcoroth merged commit 864e6f4 into main Apr 20, 2026
32 checks passed
@marcoroth marcoroth deleted the engine-parser-options branch April 20, 2026 02:05
@marcoroth marcoroth added this to the v1.0.0 milestone Apr 20, 2026
@marcoroth marcoroth mentioned this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Engine: Strict Mode

1 participant