Skip to content

Commit

Permalink
fix: ignore unrecognized tags compiler option with dynamic tags
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Sep 23, 2024
1 parent cfff311 commit c01d83f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/shaggy-plants-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@marko/translator-default": patch
"@marko/compiler": patch
"marko": patch
---

Fix issue with the "ignoreUnrecognizedTags" compiler option being used with dynamic tags that have attribute tags.
6 changes: 5 additions & 1 deletion packages/translator-default/src/tag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export default {
}

if (!isAttributeTag(path)) {
if (path.hub.file.markoOpts.ignoreUnrecognizedTags && !tagDef) {
if (
path.hub.file.markoOpts.ignoreUnrecognizedTags &&
!tagDef &&
!isDynamicTag(path)
) {
findAttributeTags(path).forEach(function replaceAttrTagName(child) {
child.set(
"name",
Expand Down

0 comments on commit c01d83f

Please sign in to comment.