Socket
Socket
Sign inDemoInstall

@deskeen/markdown

Package Overview
Dependencies
0
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.1 to 5.1.2

5

CHANGELOG.md
# 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 @@

2

package.json
{
"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)'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc