Skip to content

Commit

Permalink
feat: re-enable static statements in tags api
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jan 24, 2022
1 parent c74686e commit e11bd2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!-- use tags -->

static const message = "Hello";

<if=true>
Hello
${message}
</if>
4 changes: 3 additions & 1 deletion src/transform/feature-detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const featureDetectionVisitor = {
}
},
MarkoScriptlet(scriptlet, state) {
addFeature(state, "class", "Scriptlet", scriptlet);
if (!scriptlet.node.static) {
addFeature(state, "class", "Scriptlet", scriptlet);
}
},
MarkoClass(markoClass, state) {
addFeature(state, "class", "Class block", markoClass.get("body"));
Expand Down

0 comments on commit e11bd2a

Please sign in to comment.