Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

magicpen

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magicpen - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

6

lib/HtmlSerializer.js

@@ -55,5 +55,5 @@ var htmlStyles = {

HtmlSerializer.prototype.block = function (content) {
return '<div style="display: inline-block; vertical-align: top">' +
this.serialize(content) +
'</div>';
return '<div style="display: inline-block; vertical-align: top">\n' +
this.serializeLines(content) +
'\n</div>';
};

@@ -60,0 +60,0 @@

@@ -207,5 +207,5 @@ /*!

HtmlSerializer.prototype.block = function (content) {
return '<div style="display: inline-block; vertical-align: top">' +
this.serialize(content) +
'</div>';
return '<div style="display: inline-block; vertical-align: top">\n' +
this.serializeLines(content) +
'\n</div>';
};

@@ -212,0 +212,0 @@

{
"name": "magicpen",
"version": "3.0.2",
"version": "3.0.3",
"description": "Styled output in both consoles and browsers",

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

@@ -623,11 +623,11 @@ /*global describe, it, beforeEach*/

'<div style="font-family: monospace; white-space: nowrap">\n' +
' <div><div style="display: inline-block; vertical-align: top"><div style="font-family: monospace; white-space: nowrap">\n' +
' <div><div style="display: inline-block; vertical-align: top">\n' +
' <div>&nbsp;<span style="color: gray">//</span>&nbsp;</div>\n' +
' <div>&nbsp;<span style="color: gray">//</span>&nbsp;</div>\n' +
' <div>&nbsp;<span style="color: gray">//</span>&nbsp;</div>\n' +
'</div></div><div style="display: inline-block; vertical-align: top"><div style="font-family: monospace; white-space: nowrap">\n' +
'</div><div style="display: inline-block; vertical-align: top">\n' +
' <div>First&nbsp;line</div>\n' +
' <div>Second&nbsp;line</div>\n' +
' <div>&nbsp;&nbsp;Third&nbsp;line</div>\n' +
'</div></div></div>\n' +
'</div></div>\n' +
'</div>');

@@ -642,8 +642,9 @@ });

.gray(' // ').indent().text('multiline comment'));
expect(pen.toString('html'), 'to equal',
'<div style="font-family: monospace; white-space: nowrap">\n' +
' <div><span style="color: red">Hello</span><div style="display: inline-block; vertical-align: top"><div style="font-family: monospace; white-space: nowrap">\n' +
' <div><span style="color: red">Hello</span><div style="display: inline-block; vertical-align: top">\n' +
' <div><span style="color: gray">&nbsp;//&nbsp;</span>This&nbsp;is&nbsp;a</div>\n' +
' <div><span style="color: gray">&nbsp;//&nbsp;</span>&nbsp;&nbsp;multiline&nbsp;comment</div>\n' +
'</div></div></div>\n' +
'</div></div>\n' +
'</div>');

@@ -650,0 +651,0 @@ });

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