CS-Notes/docs/_style/prism-master/tests/languages/jsx/issue1421.test
2018-12-19 14:09:39 +08:00

59 lines
1.3 KiB
Java

class Columns extends React.Component {
render() {
return (
<>
<td>Hello</td>
<td>World</td>
</>
);
}
}
----------------------------------------------------
[
["keyword", "class"],
["class-name", ["Columns"]],
["keyword", "extends"],
["class-name", ["React", ["punctuation", "."], "Component"]],
["punctuation", "{"],
["function", "render"],
["punctuation", "("], ["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"], ["punctuation", "("],
["tag", [
["tag", [["punctuation", "<"]]],
["punctuation", ">"]
]],
["plain-text", "\r\n "],
["tag", [
["tag", [["punctuation", "<"], "td"]],
["punctuation", ">"]
]],
["plain-text", "Hello"],
["tag", [
["tag", [["punctuation", "</"], "td"]],
["punctuation", ">"]
]],
["plain-text", "\r\n "],
["tag", [
["tag", [["punctuation", "<"], "td"]],
["punctuation", ">"]
]],
["plain-text", "World"],
["tag", [
["tag", [["punctuation", "</"], "td"]],
["punctuation", ">"]
]],
["plain-text", "\r\n "],
["tag", [
["tag", [["punctuation", "</"]]],
["punctuation", ">"]
]],
["punctuation", ")"], ["punctuation", ";"],
["punctuation", "}"], ["punctuation", "}"]
]
----------------------------------------------------
Checks for fragments short syntax. See #1421