From 9534e4ea9200ef96d383c85a898ef9305b114278 Mon Sep 17 00:00:00 2001 From: Axel Hecht Date: Wed, 20 May 2015 14:53:02 +0200 Subject: [PATCH] Add array-of-tables to keygroup markup The markup for array-of-tables at https://github.com/toml-lang/toml#array-of-tables is [[ foo ]] Right now, the last ] isn't part of the markup. Figured making this an explicit token is the most apparent way to fix this. --- lib/ace/mode/toml_highlight_rules.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ace/mode/toml_highlight_rules.js b/lib/ace/mode/toml_highlight_rules.js index 686ffae2..1a7871ab 100644 --- a/lib/ace/mode/toml_highlight_rules.js +++ b/lib/ace/mode/toml_highlight_rules.js @@ -57,6 +57,10 @@ var TomlHighlightRules = function() { regex : '"(?=.)', next : "qqstring" }, + { + token: ["variable.keygroup.toml"], + regex: "(?:^\\s*)(\\[\\[([^\\]]+)\\]\\])" + }, { token: ["variable.keygroup.toml"], regex: "(?:^\\s*)(\\[([^\\]]+)\\])" @@ -100,4 +104,4 @@ var TomlHighlightRules = function() { oop.inherits(TomlHighlightRules, TextHighlightRules); exports.TomlHighlightRules = TomlHighlightRules; -}); \ No newline at end of file +});