From 7a25b4aeac31aa665c955f50e09d9148510d6d52 Mon Sep 17 00:00:00 2001 From: benweet Date: Mon, 10 Mar 2014 23:53:36 +0000 Subject: [PATCH] Highlight document comments --- public/res/libs/ace_mode_highlight_rules.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public/res/libs/ace_mode_highlight_rules.js b/public/res/libs/ace_mode_highlight_rules.js index ff35cc1e..ec1a1bbe 100644 --- a/public/res/libs/ace_mode_highlight_rules.js +++ b/public/res/libs/ace_mode_highlight_rules.js @@ -81,6 +81,10 @@ var MarkdownHighlightRules = function() { token : ["keyword", "text"], regex : "(\\\\?\\\\begin)(\\{[a-z]*\\*?\\})", next : "latexblock" + }, { + token : "doccomment", + regex : "<\\!---", next : + "doccomment" }, { include : "basic" }); @@ -218,7 +222,13 @@ var MarkdownHighlightRules = function() { // the end of the line token : "comment", regex : "%.*$" - }] + }], + + doccomment : [ + {token : "doccomment", regex : "-->", next : "start"}, + {defaultToken : "doccomment"} + ], + }); this.normalizeRules();