Comparing version 0.2.0 to 0.3.0
@@ -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>><</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 @@ ' ' + | ||
'<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> 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"><foo & "bar"></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> <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 <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"> // </span>First line</div>\n' + | ||
' <div><span style="color: gray"> // </span>Second line</div>\n' + | ||
' <div><span style="color: gray"> // </span> Third 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"> // </span>This is a</div>\n' + | ||
' <div><span style="color: gray"> // </span> multiline 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> <span style="color: red; font-weight: bold">fib</span> {</div>\n' + | ||
@@ -576,5 +576,5 @@ ' <div> <span style="color: black; font-weight: bold">var</span> i=0, fibs = [<span style="color: cyan">0</span>, <span style="color: cyan">1</span>];</div>\n' + | ||
' <div>}</div>\n' + | ||
'</code>'); | ||
'</div>'); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
88734
0