-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSX: Add partial support for plain text between tags
- Loading branch information
Showing
5 changed files
with
171 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
export default () => ( | ||
<div> | ||
<h1>Hi! I'm building a fake Gatsby site as part of a tutorial!</h1> | ||
<p> | ||
What do I like to do? Lots of course but definitely enjoy building | ||
websites. | ||
</p> | ||
</div> | ||
); | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "export"], | ||
["keyword", "default"], | ||
["punctuation", "("], ["punctuation", ")"], ["operator", "=>"], ["punctuation", "("], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "<"], | ||
"div" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["plain-text", []], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "<"], | ||
"h1" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["plain-text", ["Hi! I'm building a fake Gatsby site as part of a tutorial!"]], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "</"], | ||
"h1" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "<"], | ||
"p" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["plain-text", ["\r\n\t\t\tWhat do I like to do? Lots of course but definitely enjoy building\r\n\t\t\twebsites.\r\n\t\t"]], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "</"], | ||
"p" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "</"], | ||
"div" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["punctuation", ")"], ["punctuation", ";"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
See #1294. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<div>do return function</div> | ||
<p> | ||
this is not highlighted! | ||
{this.props.name} | ||
</p> | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "<"], | ||
"div" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["plain-text", ["do return function"]], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "</"], | ||
"div" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "<"], | ||
"p" | ||
]], | ||
["punctuation", ">"] | ||
]], | ||
["plain-text", [ | ||
"\r\n\tthis is not highlighted!\r\n\t", | ||
["script", [ | ||
["punctuation", "{"], | ||
["keyword", "this"], | ||
["punctuation", "."], | ||
"props", | ||
["punctuation", "."], | ||
"name", | ||
["punctuation", "}"] | ||
]] | ||
]], | ||
["tag", [ | ||
["tag", [ | ||
["punctuation", "</"], | ||
"p" | ||
]], | ||
["punctuation", ">"] | ||
]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for plain text between tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters