File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -151,18 +151,20 @@ export default class HTML extends PureComponent {
151
151
152
152
for ( let i = 0 ; i < styles . length ; i ++ ) {
153
153
const styleAttribute = styles [ i ] ;
154
+ const tagToCheck = tagName === 'rawtext' ? parentTag : tagName ;
154
155
const styleAttributeWithCSSDashes = styleAttribute . replace ( / [ A - Z ] / , ( match ) => { return `-${ match . toLowerCase ( ) } ` ; } ) ;
155
156
const overridenFromStyle = attribs && attribs . style && attribs . style . search ( styleAttributeWithCSSDashes ) !== - 1 ;
156
157
const overridenFromParentStyle = parent && parent . attribs && parent . attribs . style && parent . attribs . style . search ( styleAttributeWithCSSDashes ) !== - 1 ;
157
158
158
- const overridenFromTagStyle = tagName && tagsStyles [ tagName ] && tagsStyles [ tagName ] [ styleAttribute ] ;
159
+ const overridenFromTagStyle = tagToCheck && tagsStyles [ tagToCheck ] && tagsStyles [ tagToCheck ] [ styleAttribute ] ;
159
160
const overridenFromParentTagStyle = parentTag && tagsStyles [ parentTag ] && tagsStyles [ parentTag ] [ styleAttribute ] ;
160
161
161
162
const overridenFromClassStyles = classStyles && classStyles [ styleAttribute ] ;
163
+ const overridenFromDefaultStyles = this . defaultTextStyles [ tagToCheck ] && this . defaultTextStyles [ tagToCheck ] [ styleAttribute ] ;
162
164
163
165
const notOverriden = ! overridenFromStyle && ! overridenFromParentStyle &&
164
166
! overridenFromTagStyle && ! overridenFromParentTagStyle &&
165
- ! overridenFromClassStyles ;
167
+ ! overridenFromClassStyles && ! overridenFromDefaultStyles ;
166
168
167
169
if ( notOverriden ) {
168
170
appliedStyles [ styleAttribute ] = baseFontStyle [ styleAttribute ] ;
You can’t perform that action at this time.
0 commit comments