From 05d4d5b1ff39d8de3a65255e1f19c3029f07acf8 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Fri, 2 Aug 2024 15:25:10 -0500 Subject: [PATCH] Revert "Correct truncation when looking for data: in css folding" This reverts commit ad1e8d50d75e3cdef443de9e3a1efbec334f1366. --- shared/naturalcrit/codeEditor/codeEditor.jsx | 2 +- shared/naturalcrit/codeEditor/fold-css.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 9080379a1..a96feb723 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -438,7 +438,7 @@ const CodeEditor = createClass({ // Extra data url chomping // Try to make it pretty... - const startOfData = text.indexOf('data:') > 0 ? text.indexOf('data:') : false; + const startOfData = text.indexOf('data:'); if(startOfData) { text = (startOfData > maxLength) ? `${text.slice(0, text.indexOf(':') + 1)} ... ${text.slice(startOfData, startOfData + 5)} ...` : diff --git a/shared/naturalcrit/codeEditor/fold-css.js b/shared/naturalcrit/codeEditor/fold-css.js index f21eaef45..a384d2fc2 100644 --- a/shared/naturalcrit/codeEditor/fold-css.js +++ b/shared/naturalcrit/codeEditor/fold-css.js @@ -29,7 +29,7 @@ module.exports = { // IMPORT FOLDING - const importMatcher = /^@import.*?[;]/; + const importMatcher = /^@import.*?;/; if(activeLine.match(importMatcher)) { return {