Socket
Socket
Sign inDemoInstall

markdown-it

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it - npm Package Compare versions

Comparing version 12.0.6 to 12.1.0

6

CHANGELOG.md

@@ -9,2 +9,7 @@ # Changelog

## [12.1.0] - 2021-07-01
### Changed
- Updated CM spec compatibility to 0.30.
## [12.0.6] - 2021-04-16

@@ -566,2 +571,3 @@ ### Fixed

[12.1.0]: https://github.com/markdown-it/markdown-it/compare/12.0.6...12.1.0
[12.0.6]: https://github.com/markdown-it/markdown-it/compare/12.0.5...12.0.6

@@ -568,0 +574,0 @@ [12.0.5]: https://github.com/markdown-it/markdown-it/compare/12.0.4...12.0.5

4

lib/index.js

@@ -191,3 +191,3 @@ // Main parser class

* try {
* return hljs.highlight(lang, str, true).value;
* return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;
* } catch (__) {}

@@ -212,3 +212,3 @@ * }

* return '<pre class="hljs"><code>' +
* hljs.highlight(lang, str, true).value +
* hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
* '</code></pre>';

@@ -215,0 +215,0 @@ * } catch (__) {}

@@ -13,3 +13,3 @@ // HTML block

var HTML_SEQUENCES = [
[ /^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true ],
[ /^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true ],
[ /^<!--/, /-->/, true ],

@@ -16,0 +16,0 @@ [ /^<\?/, /\?>/, true ],

@@ -24,8 +24,10 @@ // For each opening emphasis-like marker find a matching closing one

// Previously calculated lower bounds (previous fails)
// for each marker and each delimiter length modulo 3.
// for each marker, each delimiter length modulo 3,
// and for whether this closer can be an opener;
// https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460
if (!openersBottom.hasOwnProperty(closer.marker)) {
openersBottom[closer.marker] = [ -1, -1, -1 ];
openersBottom[closer.marker] = [ -1, -1, -1, -1, -1, -1 ];
}
minOpenerIdx = openersBottom[closer.marker][closer.length % 3];
minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length % 3)];

@@ -91,3 +93,3 @@ openerIdx = closerIdx - closer.jump - 1;

//
openersBottom[closer.marker][(closer.length || 0) % 3] = newMinOpenerIdx;
openersBottom[closer.marker][(closer.open ? 3 : 0) + ((closer.length || 0) % 3)] = newMinOpenerIdx;
}

@@ -94,0 +96,0 @@ }

{
"name": "markdown-it",
"version": "12.0.6",
"version": "12.1.0",
"description": "Markdown-it - modern pluggable markdown parser.",

@@ -58,3 +58,3 @@ "keywords": [

"gh-pages": "^3.1.0",
"highlight.js": "^10.0.3",
"highlight.js": "^10.7.2",
"jest-worker": "^26.6.2",

@@ -61,0 +61,0 @@ "markdown-it-abbr": "^1.0.4",

@@ -155,3 +155,3 @@ # markdown-it <!-- omit in toc -->

try {
return hljs.highlight(lang, str).value;
return hljs.highlight(str, { language: lang }).value;
} catch (__) {}

@@ -176,3 +176,3 @@ }

return '<pre class="hljs"><code>' +
hljs.highlight(lang, str, true).value +
hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
'</code></pre>';

@@ -179,0 +179,0 @@ } catch (__) {}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc