font , correction p
This commit is contained in:
@@ -1 +1 @@
|
|||||||
1.1.79
|
1.1.80
|
||||||
@@ -499,9 +499,11 @@
|
|||||||
'line-height',
|
'line-height',
|
||||||
'color',
|
'color',
|
||||||
];
|
];
|
||||||
|
const styleTags = new Set(['SPAN', 'B', 'STRONG', 'I', 'EM', 'U', 'A', 'SUB', 'SUP']);
|
||||||
const walk = (orig, copy) => {
|
const walk = (orig, copy) => {
|
||||||
if (!orig || !copy) return;
|
if (!orig || !copy) return;
|
||||||
if (orig.nodeType === 1 && copy.nodeType === 1) {
|
if (orig.nodeType === 1 && copy.nodeType === 1) {
|
||||||
|
if (styleTags.has(orig.tagName) && orig.getAttribute('data-gjs-type') !== 'default') {
|
||||||
const cs = winRef.getComputedStyle(orig);
|
const cs = winRef.getComputedStyle(orig);
|
||||||
let style = copy.getAttribute('style') || '';
|
let style = copy.getAttribute('style') || '';
|
||||||
const hasStyle = (name) => new RegExp(`${name}\\s*:`, 'i').test(style);
|
const hasStyle = (name) => new RegExp(`${name}\\s*:`, 'i').test(style);
|
||||||
@@ -519,6 +521,7 @@
|
|||||||
});
|
});
|
||||||
if (style) copy.setAttribute('style', style.trim());
|
if (style) copy.setAttribute('style', style.trim());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const origChildren = orig.childNodes || [];
|
const origChildren = orig.childNodes || [];
|
||||||
const copyChildren = copy.childNodes || [];
|
const copyChildren = copy.childNodes || [];
|
||||||
for (let i = 0; i < origChildren.length; i += 1) {
|
for (let i = 0; i < origChildren.length; i += 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user