mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 09:32:51 +00:00
Add data: URL folding for CSS.
Regex might need tweaking to catch all cases, but it catches the basics.
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user