From 20e6319fb9fa4ed3cf285b921a1f2e580c202a36 Mon Sep 17 00:00:00 2001 From: rickstrahl Date: Fri, 14 Aug 2020 15:39:34 -1000 Subject: [PATCH] Update italic highlighting rules to avoid intra word highlights. #4358 --- lib/ace/mode/markdown_highlight_rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js index d3a784f4c62..8186a160bea 100644 --- a/lib/ace/mode/markdown_highlight_rules.js +++ b/lib/ace/mode/markdown_highlight_rules.js @@ -148,7 +148,7 @@ var MarkdownHighlightRules = function() { regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" }, { // emphasis * _ token : "string.emphasis", - regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + regex : "(?<=\\s|^)([*_])[^*_]*\\1(?=\\s|$)" }, { // token : ["text", "url", "text"], regex : "(<)("+