public
/
jst.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f40ca99
)
Remove parentheses around interpolated value since almost always JSON
author
Nick Downing
<nick@ndcode.org>
Wed, 12 Jan 2022 14:20:49 +0000
(
01:20
+1100)
committer
Nick Downing
<nick@ndcode.org>
Wed, 12 Jan 2022 14:21:34 +0000
(
01:21
+1100)
visitors.js
patch
|
blob
|
history
diff --git
a/visitors.js
b/visitors.js
index
83cf467
..
48a5b1e
100644
(file)
--- a/
visitors.js
+++ b/
visitors.js
@@
-221,7
+221,7
@@
let html_body = (context, st, c) => {
if (render.error)
throw render.error
let code = render.code
- if (
code.includes('(${')
) {
+ if (
render.interpolated
) {
prefix = prefix.replaceAll('\\', '\\\\').replaceAll('${', '\\${')
prefix_is_template = true
}