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 8.1.0 to 8.2.0

9

CHANGELOG.md

@@ -0,1 +1,10 @@

8.2.0 / 2016-12-01
------------------
- Updated CM spec compatibility to 0.27 (no significant changes).
- Fix backticks handle inside tables, #303.
- Fix edge case for fenced blocks with `~~~` in info, #301.
- Fix fallback to reference if link is not valid, #302.
8.1.0 / 2016-11-03

@@ -2,0 +11,0 @@ ------------------

2

lib/rules_block/fence.js

@@ -31,3 +31,3 @@ // fences (``` lang, ~~~ lang)

if (params.indexOf('`') >= 0) { return false; }
if (params.indexOf(String.fromCharCode(marker)) >= 0) { return false; }

@@ -34,0 +34,0 @@ // Since start is found, we can report success here in validation mode

@@ -28,9 +28,18 @@ // GFM table, non-standard

while (pos < max) {
if (ch === 0x60/* ` */ && (escapes % 2 === 0)) {
backTicked = !backTicked;
lastBackTick = pos;
if (ch === 0x60/* ` */) {
if (backTicked) {
// make \` close code sequence, but not open it;
// the reason is: `\` is correct code block
backTicked = false;
lastBackTick = pos;
} else if (escapes % 2 === 0) {
backTicked = true;
lastBackTick = pos;
}
} else if (ch === 0x7c/* | */ && (escapes % 2 === 0) && !backTicked) {
result.push(str.substring(lastPos, pos));
lastPos = pos + 1;
} else if (ch === 0x5c/* \ */) {
}
if (ch === 0x5c/* \ */) {
escapes++;

@@ -37,0 +46,0 @@ } else {

@@ -23,3 +23,4 @@ // Process [link](<to> "stuff")

max = state.posMax,
start = state.pos;
start = state.pos,
parseReference = true;

@@ -40,2 +41,5 @@ if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }

// might have found a valid shortcut link, disable reference parsing
parseReference = false;
// [link]( <href> "title" )

@@ -89,7 +93,9 @@ // ^^ skipping these spaces

if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {
state.pos = oldPos;
return false;
// parsing a valid shortcut link failed, fallback to reference
parseReference = true;
}
pos++;
} else {
}
if (parseReference) {
//

@@ -96,0 +102,0 @@ // Link reference

{
"name": "markdown-it",
"version": "8.1.0",
"version": "8.2.0",
"description": "Markdown-it - modern pluggable markdown parser.",

@@ -5,0 +5,0 @@ "keywords": [

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc