@contrail/document-generation
Advanced tools
Comparing version
@@ -42,5 +42,12 @@ "use strict"; | ||
} | ||
let fontStyles = ''; | ||
if ((_b = style === null || style === void 0 ? void 0 : style.font) === null || _b === void 0 ? void 0 : _b.size) { | ||
formattedText = `<span style="font-size: ${style.font.size}pt;">${formattedText}</span>`; | ||
fontStyles += `font-size: ${style.font.size}pt; `; | ||
} | ||
if (style === null || style === void 0 ? void 0 : style.color) { | ||
fontStyles += `color: ${style.color}; `; | ||
} | ||
if (fontStyles.length) { | ||
formattedText = `<span style="${fontStyles}">${formattedText}</span>`; | ||
} | ||
formattedText = `<p>${formattedText}</p>`; | ||
@@ -47,0 +54,0 @@ return formattedText; |
{ | ||
"name": "@contrail/document-generation", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"description": "Utilities for automatic generation of documents.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
758149
0.03%1181
0.6%