New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@contrail/document-generation

Package Overview
Dependencies
Maintainers
9
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/document-generation - npm Package Compare versions

Comparing version 1.0.27 to 1.0.28

1

lib/util/document-text-element-util.d.ts

@@ -9,2 +9,3 @@ import { DocumentElement, StyleDefinition } from "@contrail/documents";

static extractTextDecorationFromHTML(text: any): string;
static extractFontFromHTML(text: any): any;
}

@@ -34,3 +34,3 @@ "use strict";

static applyInLineStyling(text, style) {
var _a, _b;
var _a, _b, _c;
let formattedText = text;

@@ -50,2 +50,5 @@ if ((style === null || style === void 0 ? void 0 : style.font.weight) === 'bold') {

}
if ((_c = style === null || style === void 0 ? void 0 : style.font) === null || _c === void 0 ? void 0 : _c.family) {
fontStyles += `font-family: '${style.font.family}'; `;
}
if (fontStyles.length) {

@@ -77,2 +80,6 @@ formattedText = `<span style="${fontStyles}">${formattedText}</span>`;

}
const font = this.extractFontFromHTML(text);
if (font) {
style.font.family = font;
}
return style;

@@ -105,3 +112,12 @@ }

}
static extractFontFromHTML(text) {
let regex = /font-family: (.*?);/;
let match = text.match(regex);
if (match === null || match === void 0 ? void 0 : match.length) {
let font = match[1];
font = font.replace(/['"]+/g, '');
return font;
}
}
}
exports.DocumentTextElementUtil = DocumentTextElementUtil;

2

package.json
{
"name": "@contrail/document-generation",
"version": "1.0.27",
"version": "1.0.28",
"description": "Utilities for automatic generation of documents.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc