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 2.2.0 to 2.2.1

8

CHANGELOG.md

@@ -0,1 +1,9 @@

2.2.1 / 2014-12-29
------------------
- Added development info.
- Fixed line breaks in definitions lists.
- .use() now pass any number of params to plugins.
2.2.0 / 2014-12-28

@@ -2,0 +10,0 @@ ------------------

5

lib/index.js

@@ -335,4 +335,5 @@ // Main perser class

**/
MarkdownIt.prototype.use = function (plugin, options) {
plugin(this, options);
MarkdownIt.prototype.use = function (plugin /*, options, ... */) {
var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
plugin.apply(plugin, args);
return this;

@@ -339,0 +340,0 @@ };

@@ -135,3 +135,3 @@ /**

}
if (tokens[idx + 1].type === 'list_item_close') {
if (tokens[idx + 1].type.slice(-5) === 'close') {
return '';

@@ -147,3 +147,4 @@ }

var title = tokens[idx].title ? (' title="' + escapeHtml(replaceEntities(tokens[idx].title)) + '"') : '';
return '<a href="' + escapeHtml(tokens[idx].href) + '"' + title + '>';
var target = tokens[idx].target ? (' target="' + escapeHtml(tokens[idx].target) + '"') : '';
return '<a href="' + escapeHtml(tokens[idx].href) + '"' + title + target + '>';
};

@@ -150,0 +151,0 @@ rules.link_close = function (/* tokens, idx, options, env */) {

1

lib/rules_core/linkify.js

@@ -135,2 +135,3 @@ // Replace link-like texts with link nodes.

href: links[ln].url,
target: '',
title: '',

@@ -137,0 +138,0 @@ level: level++

@@ -36,2 +36,3 @@ // Process autolinks '<protocol:...>'

href: fullUrl,
target: '',
level: state.level

@@ -64,2 +65,3 @@ });

href: fullUrl,
target: '',
level: state.level

@@ -66,0 +68,0 @@ });

@@ -163,2 +163,3 @@ // Process [links](<to> "stuff")

href: href,
target: '',
title: title,

@@ -165,0 +166,0 @@ level: state.level++

{
"name": "markdown-it",
"version": "2.2.0",
"version": "2.2.1",
"description": "Markdown-it - modern pluggable markdown parser.",

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

@@ -43,6 +43,10 @@ # markdown-it

See __[API documentation](https://markdown-it.github.io/markdown-it/)__ for more
info and examples.
See also:
- __[API documentation](https://markdown-it.github.io/markdown-it/)__ - for more
info and examples.
- [Development info](https://github.com/markdown-it/markdown-it/tree/master/docs) -
for plugins writers.
### Simple

@@ -156,3 +160,6 @@

If you are going to write plugins - take a look at
[Development info](https://github.com/markdown-it/markdown-it/tree/master/docs).
## Syntax extensions

@@ -159,0 +166,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