X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebInspectorUI%2FUserInterface%2FViews%2FSpreadsheetStyleProperty.js;h=5e0853a47936141273a644bbd788f301bc739d61;hp=24948512b34153c86e77f8558d62cb570f4cca1a;hb=345e5d4e21b8d8ae7fc2edf4c32663459b8a1938;hpb=b781e32db2782d8f604425b7c301d065d9721af8 diff --git a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js index 2494851..5e0853a 100644 --- a/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js +++ b/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js @@ -727,20 +727,8 @@ WI.SpreadsheetStyleProperty = class SpreadsheetStyleProperty extends WI.Object if (!selection.rangeCount || selection.getRangeAt(0).endOffset !== text.length) return; - // Find the first and last index (if any) of a quote character to ensure that the string - // doesn't contain unbalanced quotes. If so, then there's no way that the semicolon could be - // part of a string within the value, so we can assume that it's the property "terminator". - const quoteRegex = /["']/g; - let start = -1; - let end = text.length; - let match = null; - while (match = quoteRegex.exec(text)) { - if (start < 0) - start = match.index; - end = match.index + 1; - } - - if (start !== -1 && !text.substring(start, end).hasMatchingEscapedQuotes()) + let unbalancedCharacters = WI.CSSCompletions.completeUnbalancedValue(text); + if (unbalancedCharacters) return; event.preventDefault();