svelte-rtf-editor 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rtf-parser.js +4 -3
- package/package.json +1 -1
package/dist/rtf-parser.js
CHANGED
|
@@ -444,8 +444,9 @@ export function rtfToHtml(rtfString) {
|
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
//
|
|
448
|
-
// own,
|
|
447
|
+
// Headings are recognized by their ratio to the body size. Text keeps its
|
|
448
|
+
// own size, though: anything other than 12 pt carries a font-size, so a
|
|
449
|
+
// document written at 9 pt still shows at 9 pt.
|
|
449
450
|
const bodySize = bodyHalfPoints(rootGroup);
|
|
450
451
|
// State stack for nested groups
|
|
451
452
|
function defaultState() {
|
|
@@ -484,7 +485,7 @@ export function rtfToHtml(rtfString) {
|
|
|
484
485
|
if (bg)
|
|
485
486
|
styles.push(`background-color:${bg}`);
|
|
486
487
|
}
|
|
487
|
-
if (state.fontSize && state.fontSize !==
|
|
488
|
+
if (state.fontSize && state.fontSize !== DEFAULT_HALF_POINTS) {
|
|
488
489
|
styles.push(`font-size:${state.fontSize / 2}pt`);
|
|
489
490
|
}
|
|
490
491
|
if (styles.length === 0)
|
package/package.json
CHANGED