0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Correct truncation when looking for data: in css folding

This commit is contained in:
David Bolack
2024-08-02 15:24:14 -05:00
parent c926f0de79
commit ad1e8d50d7
2 changed files with 2 additions and 2 deletions

View File

@@ -438,7 +438,7 @@ const CodeEditor = createClass({
// Extra data url chomping
// Try to make it pretty...
const startOfData = text.indexOf('data:');
const startOfData = text.indexOf('data:') > 0 ? text.indexOf('data:') : false;
if(startOfData) {
text = (startOfData > maxLength) ?
`${text.slice(0, text.indexOf(':') + 1)} ... ${text.slice(startOfData, startOfData + 5)} ...` :

View File

@@ -29,7 +29,7 @@ module.exports = {
// IMPORT FOLDING
const importMatcher = /^@import.*?;/;
const importMatcher = /^@import.*?[;]/;
if(activeLine.match(importMatcher)) {
return {