@riotjs/parser
Advanced tools
Comparing version 4.3.0 to 4.3.1
# Changes for riot-parser | ||
### v4.3.1 | ||
- Improve the inline `<script>` tags check | ||
### v4.3.0 | ||
@@ -4,0 +7,0 @@ - Add support for inline script tags (`<script src='path/to/the/script'>`) |
@@ -1549,6 +1549,7 @@ 'use strict'; | ||
const attrs = node.attributes; | ||
const isCoreTag = (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG); | ||
if ([JAVASCRIPT_TAG, STYLE_TAG].includes(name)) { | ||
if (isCoreTag) { | ||
// Only accept one of each | ||
if (store[name] && (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG)) { | ||
if (store[name]) { | ||
panic(this.store.data, duplicatedNamedTag.replace('%1', name), node.start); | ||
@@ -1559,3 +1560,2 @@ } | ||
store.scryle = store[name]; | ||
} else { | ||
@@ -1562,0 +1562,0 @@ // store.last holds the last tag pushed in the stack and this are |
{ | ||
"name": "@riotjs/parser", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "The parser for Riot tags", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -131,6 +131,7 @@ /*--------------------------------------------------------------------- | ||
const attrs = node.attributes | ||
const isCoreTag = (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG) | ||
if ([JAVASCRIPT_TAG, STYLE_TAG].includes(name)) { | ||
if (isCoreTag) { | ||
// Only accept one of each | ||
if (store[name] && (JAVASCRIPT_TAG === name && !hasSrcAttribute(node) || name === STYLE_TAG)) { | ||
if (store[name]) { | ||
panic(this.store.data, duplicatedNamedTag.replace('%1', name), node.start) | ||
@@ -141,3 +142,2 @@ } | ||
store.scryle = store[name] | ||
} else { | ||
@@ -144,0 +144,0 @@ // store.last holds the last tag pushed in the stack and this are |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95351
2845