Skip to content

Commit

Permalink
Fix the <script> markers
Browse files Browse the repository at this point in the history
  • Loading branch information
Lcfvs committed Sep 4, 2021
1 parent 1e3ca91 commit 6d2967b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const tokenize = node => {
map.set(key, { tokens })
}
} else if (nodeName === 'SCRIPT') {
const tokens = identify(escaped, current.textContent)
const tokens = identify(attribute, current.textContent)

if (tokens.length) {
map.set(key, { tokens })
Expand Down Expand Up @@ -207,7 +207,8 @@ const pick = node => {
}

if (nodeName === 'SCRIPT') {
return [node, node.textContent]
console.log(node.textContent)
return [node.firstChild, node.textContent]
}

return [node, node.nodeValue]
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lcf.vs/dom-engine",
"version": "5.3.0",
"version": "5.3.1",
"description": "A composable DOM based template engine",
"type": "module",
"exports": {
Expand Down

0 comments on commit 6d2967b

Please sign in to comment.