-
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.
This fixes the known issue that inline styles (bold, italic, strike) break URLs. Inline styles are now properly highlighted inside URLs.
- Loading branch information
1 parent
d58d2ae
commit b9ec6fd
Showing
7 changed files
with
179 additions
and
32 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
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
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
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
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 |
---|---|---|
@@ -1,25 +1,154 @@ | ||
[foo](http://prismjs.com) | ||
![foo](http://prismjs.com "Foo\"bar") | ||
[foo][bar] | ||
[foo] [bar] | ||
|
||
[foo | ||
bar](http://prismjs.com) | ||
|
||
[foo *bar* baz](http://prismjs.com) | ||
[foo _bar_ baz](http://prismjs.com) | ||
[foo **bar** baz](http://prismjs.com) | ||
[foo __bar__ baz](http://prismjs.com) | ||
[foo ~bar~ baz](http://prismjs.com) | ||
[foo ~~bar~~ baz](http://prismjs.com) | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["url", [ | ||
"[foo](http://prismjs.com)" | ||
"[", | ||
["content", [ | ||
"foo" | ||
]], | ||
"](http://prismjs.com)" | ||
]], | ||
["url", [ | ||
"![foo](http://prismjs.com ", | ||
"![", | ||
["content", [ | ||
"foo" | ||
]], | ||
"](http://prismjs.com ", | ||
["string", "\"Foo\\\"bar\""], | ||
")" | ||
]], | ||
["url", [ | ||
"[foo] [", | ||
"[", | ||
["content", [ | ||
"foo" | ||
]], | ||
"][", | ||
["variable", "bar"], | ||
"]" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo" | ||
]], | ||
"] [", | ||
["variable", "bar"], | ||
"]" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo\r\nbar" | ||
]], | ||
"](http://prismjs.com)" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo ", | ||
["italic", [ | ||
["punctuation", "*"], | ||
["content", [ | ||
"bar" | ||
]], | ||
["punctuation", "*"] | ||
]], | ||
" baz" | ||
]], | ||
"](http://prismjs.com)" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo ", | ||
["italic", [ | ||
["punctuation", "_"], | ||
["content", [ | ||
"bar" | ||
]], | ||
["punctuation", "_"] | ||
]], | ||
" baz" | ||
]], | ||
"](http://prismjs.com)" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo ", | ||
["bold", [ | ||
["punctuation", "**"], | ||
["content", [ | ||
"bar" | ||
]], | ||
["punctuation", "**"] | ||
]], | ||
" baz" | ||
]], | ||
"](http://prismjs.com)" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo ", | ||
["bold", [ | ||
["punctuation", "__"], | ||
["content", [ | ||
"bar" | ||
]], | ||
["punctuation", "__"] | ||
]], | ||
" baz" | ||
]], | ||
"](http://prismjs.com)" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo ", | ||
["strike", [ | ||
["punctuation", "~"], | ||
["content", [ | ||
"bar" | ||
]], | ||
["punctuation", "~"] | ||
]], | ||
" baz" | ||
]], | ||
"](http://prismjs.com)" | ||
]], | ||
["url", [ | ||
"[", | ||
["content", [ | ||
"foo ", | ||
["strike", [ | ||
["punctuation", "~~"], | ||
["content", [ | ||
"bar" | ||
]], | ||
["punctuation", "~~"] | ||
]], | ||
" baz" | ||
]], | ||
"](http://prismjs.com)" | ||
]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for URLs. | ||
Checks for URLs. |