widget.css: fix triming
This commit is contained in:
parent
9f5def635b
commit
741c40cccc
1 changed files with 2 additions and 2 deletions
|
|
@ -183,8 +183,8 @@ module.exports.widgets = function(data,parent) {
|
|||
var css = ';' + widgetData.css,
|
||||
scopedCss = ''
|
||||
|
||||
css = css.replace(/[;\}]*([^\;\{]*\{[^\}]*\})/g, (m)=>{
|
||||
if (m[0]==';') m = m.substr(1,m.length)
|
||||
css = css.replace(/[;\}\s]*([^;\{]*\{[^\}]*\})/g, (m)=>{
|
||||
m = m.replace(/^[;\}\s]*/,'')
|
||||
if (m[0]=='&') {
|
||||
scopedCss += m
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue