diff --git a/lib/ace/mode/asciidoc_highlight_rules.js b/lib/ace/mode/asciidoc_highlight_rules.js index 24eeafd7..032cadf4 100644 --- a/lib/ace/mode/asciidoc_highlight_rules.js +++ b/lib/ace/mode/asciidoc_highlight_rules.js @@ -163,8 +163,9 @@ var AsciidocHighlightRules = function() { "macros": [ {token: "macro", regex: /{[\w\-$]+}/}, {token: ["text", "string", "text", "constant.character", "text"], regex: /({)([\w\-$]+)(:)?(.+)?(})/}, - {token: ["markup.list.macro", "keyword", "string"], regex: /([\w\.\/\-]+::?)([^\s\[]+)(\[.*?\])?/}, - {token: ["markup.list.macro", "keyword"], regex: /([\w\.\/\-]+::?)(\[.*?\])/}, + {token: ["text", "markup.list.macro", "keyword", "string"], regex: /(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/}, + {token: ["markup.list.macro", "keyword", "string"], regex: /([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/}, + {token: ["markup.list.macro", "keyword"], regex: /([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/}, {token: "keyword", regex: /^:.+?:(?= |$)/} ],