marked-terminal
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -134,6 +134,8 @@ "use strict"; | ||
var hasText = text && text !== href; | ||
var out = ''; | ||
if (text) out += text + ' ('; | ||
if (hasText) out += text + ' ('; | ||
out += this.o.href(href); | ||
if (text) out += ')'; | ||
if (hasText) out += ')'; | ||
@@ -140,0 +142,0 @@ return this.o.link(out); |
{ | ||
"name": "marked-terminal", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A custom render for marked to output to the Terminal", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11
tests.js
@@ -30,2 +30,13 @@ | ||
it('should render links', function () { | ||
var text = '[Google](http://google.com)'; | ||
var expected = 'Google (http://google.com)'; | ||
assert.equal(marked(text).trim(), expected); | ||
}); | ||
it('should not show link href twice if link and url is equal', function () { | ||
var text = 'http://google.com'; | ||
assert.equal(marked(text).trim(), text); | ||
}); | ||
it('should render html as html', function () { | ||
@@ -32,0 +43,0 @@ var html = '<strong>foo</strong>'; |
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
61759
253