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

express-hogan-pdf

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-hogan-pdf - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

1

lib/defaults.js

@@ -34,3 +34,2 @@ 'use strict';

size: 12,
trim: true,
pre: false

@@ -37,0 +36,0 @@ },

20

lib/pdf.js

@@ -186,4 +186,4 @@ 'use strict';

let oldState = _.omit(state, ['doc', 'stack', 'parent']);
oldState.style = _.extend({}, state.style),
state.stack.push(oldState);
state.style = _.clone(state.style);
}

@@ -242,3 +242,3 @@

state.path = 'pdf.page(' + (index + 1) + ')';
state.style = _.extend({}, this.config.styles.p);
state.style = _.clone(this.config.styles.p);
this.page(state, page.options, page.children);

@@ -331,2 +331,3 @@ });

state.right = options.pos.right;
state.doc.trim = true;
}

@@ -356,2 +357,3 @@

}
state.doc.trim = true;

@@ -454,3 +456,3 @@ } else {

}
state.link = options.href;
state.style.link = options.href;

@@ -525,12 +527,13 @@ this.genericTag(state, options, children);

if (state.style.trim) {
textContent = textContent.replace(/^\s+/mg, '');
}
if (!state.style.pre) {
textContent = textContent.replace(/[\n\s]+/g, ' ');
}
if (state.style.trim || state.doc.trim) {
textContent = textContent.replace(/^\s+/mg, '');
state.doc.trim = false;
}
let options = _.clone(state.style);
if (state.link) options.link = state.link;
options.continued = true;
options.link = options.link || false;

@@ -543,3 +546,4 @@ debugText('Rendering text',

y: state.doc.y,
options: options
options,
stack: _.pluck(state.stack, 'style')
}

@@ -546,0 +550,0 @@ );

{
"name": "express-hogan-pdf",
"version": "1.0.0",
"version": "1.0.1",
"description": "PDF generation using Hogan.js to template XML. Can be used as an express view engine or can output to a PDF stream, buffer, or file",

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

@@ -376,4 +376,3 @@ 'use strict';

pre: false,
size: 12,
trim: true
size: 12
});

@@ -397,4 +396,3 @@ });

pre: false,
size: 12,
trim: true
size: 12
});

@@ -422,4 +420,3 @@ });

pre: false,
size: 12,
trim: true
size: 12
});

@@ -426,0 +423,0 @@ });

Sorry, the diff of this file is not supported yet

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