@deskeen/markdown
Advanced tools
Comparing version 5.1.1 to 5.1.2
# Changelog | ||
## 5.1.2 - 2021-05-04 | ||
**🐛 Bugfix** | ||
- A paragraph can contain brackets before a link. | ||
## 5.1.1 - 2021-05-27 | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "@deskeen/markdown", | ||
"version": "5.1.1", | ||
"version": "5.1.2", | ||
"description": "Node.js Markdown to HTML Parser", | ||
@@ -5,0 +5,0 @@ "author": "Morgan Schmiedt", |
@@ -647,3 +647,3 @@ 'use strict' | ||
} else if (allowLink) { | ||
const endMatch = /(.+?)]\((.+?)\)/.exec(restLineText) | ||
const endMatch = /^([^\]]+?)]\(([^)]+?)\)/.exec(restLineText) | ||
@@ -650,0 +650,0 @@ if (endMatch) { |
@@ -18,2 +18,18 @@ 'use strict' | ||
test('Link with brackets on the same line', function (t) { | ||
const input = 'some [...] word [link](example.com)' | ||
const output = '<p>some [...] word <a href="example.com">link</a></p>' | ||
t.equal(parseToHtml(input), output, 'Output is valid') | ||
t.end() | ||
}) | ||
test('Link with brackets on the same line', function (t) { | ||
const input = 'some [link](example.com) (...)' | ||
const output = '<p>some <a href="example.com">link</a> (...)</p>' | ||
t.equal(parseToHtml(input), output, 'Output is valid') | ||
t.end() | ||
}) | ||
test('Link with callback', function (t) { | ||
@@ -20,0 +36,0 @@ const input = 'This is a [link](https://example.com)' |
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
165688
3221