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

magicpen

Package Overview
Dependencies
Maintainers
1
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 0.2.0 to 0.3.0

2

lib/HtmlSerializer.js

@@ -38,3 +38,3 @@ var shim = require('./shim');

HtmlSerializer.prototype.serialize = function (lines) {
return '<code>\n' + this.serializeLines(lines) + '\n</code>';
return '<div style="font-family: monospace">\n' + this.serializeLines(lines) + '\n</div>';
};

@@ -41,0 +41,0 @@

@@ -88,3 +88,3 @@ /*!

HtmlSerializer.prototype.serialize = function (lines) {
return '<code>\n' + this.serializeLines(lines) + '\n</code>';
return '<div style="font-family: monospace">\n' + this.serializeLines(lines) + '\n</div>';
};

@@ -91,0 +91,0 @@

{
"name": "magicpen",
"version": "0.2.0",
"version": "0.3.0",
"description": "Styled output in both consoles and browsers",

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

@@ -227,5 +227,5 @@ /*global describe, it, beforeEach, before*/

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div>&gt;&lt;</div>\n' +
'</code>'
'</div>'
);

@@ -237,3 +237,3 @@ });

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div><span style="color: red">Hello</span>' +

@@ -243,3 +243,3 @@ '&nbsp;' +

'<span style="color: red; font-weight: bold">!</span></div>\n' +
'</code>');
'</div>');
});

@@ -250,6 +250,6 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div><span style="color: red">Hello</span></div>\n' +
' <div><span style="color: green">world</span></div>\n' +
'</code>');
'</div>');
});

@@ -264,7 +264,7 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div><span style="color: red">Hello</span></div>\n' +
' <div>&nbsp;&nbsp;beautiful</div>\n' +
' <div><span style="color: green">world</span></div>\n' +
'</code>');
'</div>');
});

@@ -275,5 +275,5 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div><span style="color: red">&lt;foo&nbsp;&amp;&nbsp;&quot;bar&quot;&gt;</span></div>\n' +
'</code>');
'</div>');
});

@@ -288,5 +288,5 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div><span style="color: red">Danger</span>&nbsp;<span style="color: red">danger</span></div>\n' +
'</code>');
'</div>');
});

@@ -299,5 +299,5 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div>Hello&nbsp;<span style="color: red">world!</span></div>\n' +
'</code>');
'</div>');
});

@@ -313,7 +313,7 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div><span style="color: gray">&nbsp;//&nbsp;</span>First&nbsp;line</div>\n' +
' <div><span style="color: gray">&nbsp;//&nbsp;</span>Second&nbsp;line</div>\n' +
' <div><span style="color: gray">&nbsp;//&nbsp;</span>&nbsp;&nbsp;Third&nbsp;line</div>\n' +
'</code>');
'</div>');
});

@@ -328,8 +328,8 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
' <div><span style="color: red">Hello</span><div style="display: inline-block; vertical-align: top"><code>\n' +
'<div style="font-family: monospace">\n' +
' <div><span style="color: red">Hello</span><div style="display: inline-block; vertical-align: top"><div style="font-family: monospace">\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' +
'</code></div></div>\n' +
'</code>');
'</div></div></div>\n' +
'</div>');
});

@@ -419,3 +419,3 @@

expect(pen.toString('html'), 'to equal',
'<code>\n' +
'<div style="font-family: monospace">\n' +
' <div>' +

@@ -433,3 +433,3 @@ '<span style="color: gray">H</span>' +

'<span style="color: yellow">d</span></div>\n' +
'</code>');
'</div>');
});

@@ -566,3 +566,3 @@ });

writeFibWithPen(pen);
expect(pen.toString('html'), 'to equal', '<code>\n' +
expect(pen.toString('html'), 'to equal', '<div style="font-family: monospace">\n' +
' <div><span style="color: black; font-weight: bold">function</span>&nbsp;<span style="color: red; font-weight: bold">fib</span>&nbsp;{</div>\n' +

@@ -576,5 +576,5 @@ ' <div>&nbsp;&nbsp;<span style="color: black; font-weight: bold">var</span>&nbsp;i=0,&nbsp;fibs&nbsp;=&nbsp;[<span style="color: cyan">0</span>,&nbsp;<span style="color: cyan">1</span>];</div>\n' +

' <div>}</div>\n' +
'</code>');
'</div>');
});
});
});
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