Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.0.1 to 4.0.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

4.0.2 / 2015-03-22
------------------
- Fixed emphasis `marker` fields in tokens (#69).
- Fixed html block tokens with numbers in name (#74).
4.0.1 / 2015-03-13

@@ -2,0 +9,0 @@ ------------------

4

lib/renderer.js

@@ -64,3 +64,3 @@ /**

return self.renderToken(tokens, idx, options, env, self);
return self.renderToken(tokens, idx, options);
};

@@ -238,3 +238,3 @@

} else {
result += this.renderToken(tokens, i, options, env);
result += this.renderToken(tokens, i, options);
}

@@ -241,0 +241,0 @@ }

@@ -9,4 +9,4 @@ // HTML block

var HTML_TAG_OPEN_RE = /^<([a-zA-Z]{1,15})[\s\/>]/;
var HTML_TAG_CLOSE_RE = /^<\/([a-zA-Z]{1,15})[\s>]/;
var HTML_TAG_OPEN_RE = /^<([a-zA-Z][a-zA-Z0-9]{0,14})[\s\/>]/;
var HTML_TAG_CLOSE_RE = /^<\/([a-zA-Z][a-zA-Z0-9]{0,14})[\s>]/;

@@ -13,0 +13,0 @@ function isLetter(ch) {

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

token = state.push('em_close', 'em', -1);
token.markup = String.fromCharCode(marker) + String.fromCharCode(marker);
token.markup = String.fromCharCode(marker);
}
for (count = startCount; count > 1; count -= 2) {
token = state.push('strong_close', 'strong', -1);
token.markup = String.fromCharCode(marker);
token.markup = String.fromCharCode(marker) + String.fromCharCode(marker);
}

@@ -174,0 +174,0 @@

{
"name": "markdown-it",
"version": "4.0.1",
"version": "4.0.2",
"description": "Markdown-it - modern pluggable markdown parser.",

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

@@ -212,18 +212,22 @@ # markdown-it

Here is result of CommonMark spec parse at Core i5 2.4 GHz (i5-4258U):
Here is result of readme parse at MB Pro Retina 2013 (2.4 GHz):
```bash
$ benchmark/benchmark.js spec
Selected samples: (1 of 27)
> spec
$ benchmark/benchmark.js readme
Selected samples: (1 of 28)
> README
Sample: spec.txt (110610 bytes)
> commonmark-reference x 68.63 ops/sec ±6.53% (72 runs sampled)
> current x 79.62 ops/sec ±3.22% (80 runs sampled)
> current-commonmark x 103 ops/sec ±1.10% (76 runs sampled)
> marked-0.3.2 x 23.14 ops/sec ±1.66% (42 runs sampled)
Sample: README.md (7774 bytes)
> commonmark-reference x 1,222 ops/sec ±0.96% (97 runs sampled)
> current x 743 ops/sec ±0.84% (97 runs sampled)
> current-commonmark x 1,568 ops/sec ±0.84% (98 runs sampled)
> marked-0.3.2 x 1,587 ops/sec ±4.31% (93 runs sampled)
```
__Note.__ CommonMark version runs with [simplified link normalizers](https://github.com/markdown-it/markdown-it/blob/master/benchmark/implementations/current-commonmark/index.js)
for more "honest" compare. Difference is ~ 1.5x.
As you can see, `markdown-it` doesn't pay with speed for it's flexibility.
Because it's written in monomorphyc style and uses JIT inline caches effectively.
Slowdown of "full" version caused by additional features, not available in
other implementations.

@@ -230,0 +234,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