Add data: URL folding for CSS.

Regex might need tweaking to catch all cases, but it catches the basics.
This commit is contained in:
David Bolack
2024-07-21 12:40:49 -05:00
parent fde797c044
commit 2fc7aa454f
2 changed files with 21 additions and 1 deletions
+12
View File
@@ -38,6 +38,18 @@ module.exports = {
};
}
// data-url folding FOR CSS.
const dataURLMatcher = /url\(.*?data\:.*\)/;
if(activeLine.match(dataURLMatcher)) {
return {
from : CodeMirror.Pos(start.line, 0),
to : CodeMirror.Pos(start.line, cm.getLine(start.line).length)
};
}
return null;
});
}