0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -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:
Neil Jenkins 2020-02-03 11:37:39 +11:00
parent 8980c1ac4a
commit b550de09f0
3 changed files with 1 additions and 37 deletions

View file

@ -1880,24 +1880,6 @@ var fontSizes = {
}; };
var styleToSemantic = { 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: { fontWeight: {
regexp: /^bold|^700/i, regexp: /^bold|^700/i,
replace: function ( doc ) { replace: function ( doc ) {

File diff suppressed because one or more lines are too long

View file

@ -11,24 +11,6 @@ var fontSizes = {
}; };
var styleToSemantic = { 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: { fontWeight: {
regexp: /^bold|^700/i, regexp: /^bold|^700/i,
replace: function ( doc ) { replace: function ( doc ) {