CS-Notes/docs/_style/prism-master/tests/languages/jsx/issue1408.test

36 lines
811 B
Plaintext
Raw Normal View History

2018-12-19 14:09:39 +08:00
<div style={{ marginLeft: `${sidePanelWidth}px` }}>
----------------------------------------------------
[
["tag", [
["tag", [
["punctuation", "<"],
"div"
]],
["attr-name", ["style"]],
["script", [
["script-punctuation", "="],
["punctuation", "{"],
["punctuation", "{"],
" marginLeft",
["punctuation", ":"],
["template-string", [
["string", "`"],
["interpolation", [
["interpolation-punctuation", "${"],
"sidePanelWidth",
["interpolation-punctuation", "}"]
]],
["string", "px`"]
]],
["punctuation", "}"],
["punctuation", "}"]
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for template string with interpolation inside object inside JSX tag. See #1408