From 99c8aed4d097e843a18e27b82e848cce91ab543c Mon Sep 17 00:00:00 2001 From: benweet Date: Tue, 26 Nov 2013 22:52:46 +0000 Subject: [PATCH] Fixed multiple inline maths in ACE highlighting. Fixes #198 --- public/res/libs/ace_mode_highlight_rules.js | 12 ++++++------ public/res/styles/main.less | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/public/res/libs/ace_mode_highlight_rules.js b/public/res/libs/ace_mode_highlight_rules.js index a6e14382..7a4a4cd8 100644 --- a/public/res/libs/ace_mode_highlight_rules.js +++ b/public/res/libs/ace_mode_highlight_rules.js @@ -73,16 +73,10 @@ var MarkdownHighlightRules = function() { token : "markup.list", regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next : "listblock-start" - }, { // Escaped $ - token : "text", - regex : "\\\\\\$", }, { // Math block token : "constant.language.escape", regex : "\\$\\$|\\\\\\\\\\[|\\\\\\\\\\\\\\\\\\(", next : "mathblock" - }, { // Math inline - token : ["constant.language.escape", "keyword", "constant.language.escape"], - regex : "(\\$)(.*)(\\$)" }, { // LaTeX block token : ["keyword", "text"], regex : "(\\\\?\\\\begin)(\\{[a-z]*\\*?\\})", @@ -95,6 +89,12 @@ var MarkdownHighlightRules = function() { "basic" : [{ token : "constant.language.escape", regex : /\\[\\`*_{}\[\]()#+\-.!]/ + }, { // Escaped $ + token : "text", + regex : "\\\\\\$", + }, { // Math inline + token : ["constant.language.escape", "keyword", "constant.language.escape"], + regex : "(\\$)(.*?)(\\$)" }, { // code span ` token : "code", regex : "(`+)(.*?[^`])(\\1)" diff --git a/public/res/styles/main.less b/public/res/styles/main.less index ccc2fedc..0e0261df 100644 --- a/public/res/styles/main.less +++ b/public/res/styles/main.less @@ -334,7 +334,6 @@ a { height: @input-height-base; width: 65px; padding-top: 10px; - padding-right: 8px; .bar { display: inline-block; width: 10px;