From 95554b74ace04ec19e665b2430e85676cd6f8a35 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Tue, 16 Dec 2008 18:28:38 +0300 Subject: [PATCH] fixed [RUBY-2553] : Dynamically generated value inspection reacts on value substitution --- .../src/com/intellij/testFramework/ExpectedHighlightingData.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ExtendedApi/src/com/intellij/testFramework/ExpectedHighlightingData.java b/ExtendedApi/src/com/intellij/testFramework/ExpectedHighlightingData.java index 59b6ccff9e..64b5237a25 100644 --- a/ExtendedApi/src/com/intellij/testFramework/ExpectedHighlightingData.java +++ b/ExtendedApi/src/com/intellij/testFramework/ExpectedHighlightingData.java @@ -169,7 +169,7 @@ public class ExpectedHighlightingData { // er... // any code then (with optional descr="...") then any code then then any code - @NonNls String pat = ".*?(<(" + typesRegex + ")(?: descr=\"((?:[^\"\\\\]|\\\\\")*)\")?(?: type=\"([0-9A-Z_]+)\")?(?: foreground=\"([0-9xa-f]+)\")?(?: background=\"([0-9xa-f]+)\")?(?: effectcolor=\"([0-9xa-f]+)\")?(?: effecttype=\"([A-Z]+)\")?(?: fonttype=\"([0-9]+)\")?(/)?>)(.*)"; + @NonNls String pat = ".*?(<(" + typesRegex + ")(?: descr=\"((?:[^\"\\\\]|\\\\\"|\\\\\\\\\")*)\")?(?: type=\"([0-9A-Z_]+)\")?(?: foreground=\"([0-9xa-f]+)\")?(?: background=\"([0-9xa-f]+)\")?(?: effectcolor=\"([0-9xa-f]+)\")?(?: effecttype=\"([A-Z]+)\")?(?: fonttype=\"([0-9]+)\")?(/)?>)(.*)"; //"(.+?)).*"; Pattern p = Pattern.compile(pat, Pattern.DOTALL); Out: @@ -197,6 +197,11 @@ public class ExpectedHighlightingData { descr = null; } + // replace: \\" to ", doesn't check symbol before sequence \\" + if (descr != null) { + descr = descr.replaceAll("\\\\\\\\\"", "\""); + } + String typeString = m.group(pos++); String foregroundColor = m.group(pos++); String backgroundColor = m.group(pos++); -- 2.11.4.GIT