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 4.2.0 to 4.2.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

4.2.1 / 2015-05-01
------------------
- Minor emphasis update to match CM spec 0.19.
4.2.0 / 2015-04-21

@@ -2,0 +8,0 @@ ------------------

29

lib/rules_inline/emphasis.js

@@ -14,7 +14,7 @@ // Process *this* and _that_

function scanDelims(state, start) {
var pos = start, lastChar, nextChar, count,
var pos = start, lastChar, nextChar, count, can_open, can_close,
isLastWhiteSpace, isLastPunctChar,
isNextWhiteSpace, isNextPunctChar,
can_open = true,
can_close = true,
left_flanking = true,
right_flanking = true,
max = state.posMax,

@@ -28,6 +28,2 @@ marker = state.src.charCodeAt(start);

if (pos >= max) {
can_open = false;
}
count = pos - start;

@@ -45,6 +41,6 @@

if (isNextWhiteSpace) {
can_open = false;
left_flanking = false;
} else if (isNextPunctChar) {
if (!(isLastWhiteSpace || isLastPunctChar)) {
can_open = false;
left_flanking = false;
}

@@ -54,6 +50,6 @@ }

if (isLastWhiteSpace) {
can_close = false;
right_flanking = false;
} else if (isLastPunctChar) {
if (!(isNextWhiteSpace || isNextPunctChar)) {
can_close = false;
right_flanking = false;
}

@@ -63,7 +59,8 @@ }

if (marker === 0x5F /* _ */) {
if (can_open && can_close) {
// "_" inside a word can neither open nor close an emphasis
can_open = false;
can_close = isNextPunctChar;
}
// "_" inside a word can neither open nor close an emphasis
can_open = left_flanking && (!right_flanking || isLastPunctChar);
can_close = right_flanking && (!left_flanking || isNextPunctChar);
} else {
can_open = left_flanking;
can_close = right_flanking;
}

@@ -70,0 +67,0 @@

{
"name": "markdown-it",
"version": "4.2.0",
"version": "4.2.1",
"description": "Markdown-it - modern pluggable markdown parser.",

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

@@ -67,3 +67,3 @@ # markdown-it

// browser without AMD, added to "window" on script load
// Note, there are no dash.
// Note, there is no dash in "markdownit".
var md = window.markdownit();

@@ -83,3 +83,3 @@ var result = md.render('# markdown-it rulezz!');

(*) preset define combination of active rules and options. Can be
(*) presets define combinations of active rules and options. Can be
`"commonmark"`, `"zero"` or `"default"` (if skipped). See

@@ -193,3 +193,3 @@ [API docs](https://markdown-it.github.io/markdown-it/#MarkdownIt.new) for more details.

By default all rules are enabled, but can be restricted by options. On plugin
load all it's rules are enabled automatically.
load all its rules are enabled automatically.

@@ -214,3 +214,3 @@ ```js

Here is result of readme parse at MB Pro Retina 2013 (2.4 GHz):
Here is the result of readme parse at MB Pro Retina 2013 (2.4 GHz):

@@ -233,3 +233,3 @@ ```bash

As you can see, `markdown-it` doesn't pay with speed for it's flexibility.
Slowdown of "full" version caused by additional features, not available in
Slowdown of "full" version caused by additional features not available in
other implementations.

@@ -236,0 +236,0 @@

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