mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Don't extract colour into separate <span>s
Because it's the parsed representation, you lose the comments in the CSS so it breaks the dark mode reverse transform.
This commit is contained in:
parent
8980c1ac4a
commit
b550de09f0
3 changed files with 1 additions and 37 deletions
|
@ -1880,24 +1880,6 @@ var fontSizes = {
|
|||
};
|
||||
|
||||
var styleToSemantic = {
|
||||
backgroundColor: {
|
||||
regexp: notWS,
|
||||
replace: function ( doc, classNames, colour ) {
|
||||
return createElement( doc, 'SPAN', {
|
||||
'class': classNames.highlight,
|
||||
style: 'background-color:' + colour
|
||||
});
|
||||
}
|
||||
},
|
||||
color: {
|
||||
regexp: notWS,
|
||||
replace: function ( doc, classNames, colour ) {
|
||||
return createElement( doc, 'SPAN', {
|
||||
'class': classNames.colour,
|
||||
style: 'color:' + colour
|
||||
});
|
||||
}
|
||||
},
|
||||
fontWeight: {
|
||||
regexp: /^bold|^700/i,
|
||||
replace: function ( doc ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,24 +11,6 @@ var fontSizes = {
|
|||
};
|
||||
|
||||
var styleToSemantic = {
|
||||
backgroundColor: {
|
||||
regexp: notWS,
|
||||
replace: function ( doc, classNames, colour ) {
|
||||
return createElement( doc, 'SPAN', {
|
||||
'class': classNames.highlight,
|
||||
style: 'background-color:' + colour
|
||||
});
|
||||
}
|
||||
},
|
||||
color: {
|
||||
regexp: notWS,
|
||||
replace: function ( doc, classNames, colour ) {
|
||||
return createElement( doc, 'SPAN', {
|
||||
'class': classNames.colour,
|
||||
style: 'color:' + colour
|
||||
});
|
||||
}
|
||||
},
|
||||
fontWeight: {
|
||||
regexp: /^bold|^700/i,
|
||||
replace: function ( doc ) {
|
||||
|
|
Loading…
Reference in a new issue