fix * highlighting in markdown lists
This commit is contained in:
parent
715b397976
commit
1ba09e1a84
3 changed files with 14 additions and 2 deletions
|
|
@ -9,11 +9,13 @@ test: header ends with '#'
|
|||
test: 6+ #s is not a valid header
|
||||
####### foo
|
||||
test: # followed be only space is not a valid header
|
||||
#
|
||||
test: only space between #s is not a valid header
|
||||
# #
|
||||
|
||||
# test links [Cloud9 IDE](http://www.c9.io/) #
|
||||
* [demo](http://ajaxorg.github.com/ace/)
|
||||
* usually *work* fine (_em_)
|
||||
in lists
|
||||
|
||||
in plain text <b>http://ace.ajaxorg.com<b>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@
|
|||
],[
|
||||
"start",
|
||||
["text","test: # followed be only space is not a valid header"]
|
||||
],[
|
||||
"start",
|
||||
["text","# "]
|
||||
],[
|
||||
"start",
|
||||
["text","test: only space between #s is not a valid header"]
|
||||
|
|
@ -62,6 +65,13 @@
|
|||
["markup.underline","http://ajaxorg.github.com/ace/"],
|
||||
["text",")"],
|
||||
["markup.list"," "]
|
||||
],[
|
||||
"listblock",
|
||||
["markup.list","* usually "],
|
||||
["string","*work*"],
|
||||
["markup.list"," fine ("],
|
||||
["string","_em_"],
|
||||
["markup.list",")"]
|
||||
],[
|
||||
"listblock",
|
||||
["markup.list","in lists"]
|
||||
|
|
|
|||
|
|
@ -150,12 +150,12 @@ var MarkdownHighlightRules = function() {
|
|||
token : "empty_line",
|
||||
regex : "^$",
|
||||
next : "start"
|
||||
}, {
|
||||
include : "basic", noEscape: true
|
||||
}, { // list
|
||||
token : "markup.list",
|
||||
regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
|
||||
next : "listblock-start"
|
||||
}, {
|
||||
include : "basic", noEscape: true
|
||||
}, {
|
||||
defaultToken : "markup.list"
|
||||
} ],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue