Skip to content

Parser: Fix ConditionalElementMultipleTagsError on valid templates#1240

Merged
marcoroth merged 1 commit into
mainfrom
false-conditional-element-multiple-tags-error
Feb 24, 2026
Merged

Parser: Fix ConditionalElementMultipleTagsError on valid templates#1240
marcoroth merged 1 commit into
mainfrom
false-conditional-element-multiple-tags-error

Conversation

@marcoroth

@marcoroth marcoroth commented Feb 24, 2026

Copy link
Copy Markdown
Owner

This pull request updates the conditional element analysis passes to no longer produce false ConditionalElementMultipleTagsError errors on valid templates containing complete HTML elements inside ERB control flow branches.

The following template now parses without any errors:

<% if true %>
  <% if true %>
    <div>
      <div></div>
      <% if true %><% end %>
    </div>
  <% else %>
    <div></div>
  <% end %>
<% end %>

Related #1153
Related #1146
Related #1208

Resolves #1239

@pkg-pr-new

pkg-pr-new Bot commented Feb 24, 2026

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

commit: f916364

@github-actions

github-actions Bot commented Feb 24, 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 f916364


✅ Preview deployment has been cleaned up.

@marcoroth

Copy link
Copy Markdown
Owner Author

@marcoroth marcoroth merged commit 0a3f67c into main Feb 24, 2026
32 checks passed
@marcoroth marcoroth deleted the false-conditional-element-multiple-tags-error branch February 24, 2026 20:03
@marcoroth marcoroth added this to the v1.0.0 milestone Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parser: Incorrect Conditional element pattern detected

1 participant