Update lib/ace/mode/markdown_highlight_rules.js

catch both text and "#" as token value for Atx style heading.
todo: handle Setext style heading as well.
This commit is contained in:
quexer 2012-09-06 17:28:24 +08:00
commit bbd705cd69

View file

@ -77,9 +77,9 @@ var MarkdownHighlightRules = function() {
regex: "^\\-+(?=\\s*$)"
}, { // header
token : function(value) {
return "markup.heading." + value.length;
return "markup.heading." + value.match(/#/g).length;
},
regex : "^#{1,6}"
regex : "^#{1,6}.+$"
}, github_embed("(?:javascript|js)", "js-"),
github_embed("xml", "xml-"),
github_embed("html", "html-"),