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

commonmark

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commonmark - npm Package Compare versions

Comparing version 0.26.0 to 0.27.0

20

changelog.txt

@@ -0,1 +1,21 @@

[0.27.0]
* Update spec to 0.27.
* Use correct name in DOCTYPE declaration for XML output.
It should be document, not CommonMark.
* Fix Node type names in README (Jan Marthedal Rasmussen).
* Allow shortcut link before a `(`. See jgm/CommonMark#427.
* Added all characters in Pc, Pd, Pe, Pf, Pi, Po, Ps to rePunctuation
(#108, problem not recognizing East Asian punctuation).
* Allow tab after setext header line (#109).
* Recognize h2..h6 as block tags (see jgm/CommonMark#430).
* Enforce spec's distinction between Unicode whitespace and regular whitespace
(Timothy Gu, see jgm/CommonMark#343). Per ECMA-262 6th Edition
("ECMAScript 2015") §21.2.2.12 [CharacterClassEscape], the JavaScript `\s`
escape character matches the characters specified by "Unicode whitespace,"
but not "whitespace." Rename the existing regular expression variable to
`UnicodeWhitespace`, and create and use a new regular expression variable
that only matches the limited set of "whitespace" characters.
* Removed unused definition.
[0.26.0]

@@ -2,0 +22,0 @@

4

lib/blocks.js

@@ -26,3 +26,3 @@ "use strict";

/^<!\[CDATA\[/,
/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|title|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,
/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|title|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,
new RegExp('^(?:' + OPENTAG + '|' + CLOSETAG + ')\\s*$', 'i')

@@ -56,3 +56,3 @@ ];

var reSetextHeadingLine = /^(?:=+|-+) *$/;
var reSetextHeadingLine = /^(?:=+|-+)[ \t]*$/;

@@ -59,0 +59,0 @@ var reLineEnding = /\r\n|\n|\r/;

@@ -14,3 +14,3 @@ "use strict";

module.exports.version = '0.26.0';
module.exports.version = '0.27.0';
module.exports.Node = require('./node');

@@ -17,0 +17,0 @@ module.exports.Parser = require('./blocks');

@@ -41,3 +41,3 @@ "use strict";

var rePunctuation = new RegExp(/^[\u2000-\u206F\u2E00-\u2E7F\\'!"#\$%&\(\)\*\+,\-\.\/:;<=>\?@\[\]\^_`\{\|\}~]/);
var rePunctuation = new RegExp(/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/);

@@ -75,6 +75,10 @@ var reLinkTitle = new RegExp(

var reWhitespaceChar = /^\s/;
var reWhitespaceChar = /^[ \t\n\x0b\x0c\x0d]/;
var reWhitespace = /\s+/g;
var reWhitespace = /[ \t\n\x0b\x0c\x0d]+/g;
var reUnicodeWhitespaceChar = /^\s/;
var reUnicodeWhitespace = /\s+/g;
var reFinalSpace = / *$/;

@@ -256,5 +260,5 @@

after_is_whitespace = reWhitespaceChar.test(char_after);
after_is_whitespace = reUnicodeWhitespaceChar.test(char_after);
after_is_punctuation = rePunctuation.test(char_after);
before_is_whitespace = reWhitespaceChar.test(char_before);
before_is_whitespace = reUnicodeWhitespaceChar.test(char_before);
before_is_punctuation = rePunctuation.test(char_before);

@@ -583,2 +587,4 @@

var savepos = this.pos;
// Inline link?

@@ -597,7 +603,10 @@ if (this.peek() === C_OPEN_PAREN) {

matched = true;
} else {
this.pos = savepos;
}
} else {
}
if (!matched) {
// Next, see if there's a link label
var savepos = this.pos;
var beforelabel = this.pos;

@@ -604,0 +613,0 @@ var n = this.parseLinkLabel();

@@ -69,3 +69,3 @@ "use strict";

buffer += '<?xml version="1.0" encoding="UTF-8"?>\n';
buffer += '<!DOCTYPE CommonMark SYSTEM "CommonMark.dtd">\n';
buffer += '<!DOCTYPE document SYSTEM "CommonMark.dtd">\n';

@@ -72,0 +72,0 @@ while ((event = walker.next())) {

{ "name": "commonmark",
"description": "a strongly specified, highly compatible variant of Markdown",
"version": "0.26.0",
"version": "0.27.0",
"homepage": "http://commonmark.org",

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

@@ -129,6 +129,6 @@ commonmark.js

- `type` (read-only): a String, one of
`Text`, `Softbreak`, `Hardbreak`, `Emph`, `Strong`,
`Html`, `Link`, `Image`, `Code`, `Document`, `Paragraph`,
`BlockQuote`, `Item`, `List`, `Heading`, `CodeBlock`,
`HtmlBlock` `ThematicBreak`.
`text`, `softbreak`, `linebreak`, `emph`, `strong`,
`html_inline`, `link`, `image`, `code`, `document`, `paragraph`,
`block_quote`, `item`, `list`, `heading`, `code_block`,
`html_block`, `thematic_break`.
- `firstChild` (read-only): a Node or null.

@@ -152,4 +152,4 @@ - `lastChild` (read-only): a Node or null.

- `listDelimiter`: a String, either `)` or `.` for an ordered list.
- `onEnter`, `onExit`: Strings, used only for `CustomBlock` or
`CustomInline`.
- `onEnter`, `onExit`: Strings, used only for `custom_block` or
`custom_inline`.

@@ -181,3 +181,3 @@ Nodes have the following public methods:

the tree, making transformations. This simple example converts
the contents of all `Text` nodes to ALL CAPS:
the contents of all `text` nodes to ALL CAPS:

@@ -226,3 +226,3 @@ ``` js

1. De-linkify a document, transforming links to regular text.
2. Remove all raw HTML (`Html` and `HtmlBlock` nodes).
2. Remove all raw HTML (`html_inline` and `html_block` nodes).
3. Run fenced code blocks marked with a language name through

@@ -229,0 +229,0 @@ a syntax highlighting library, replacing them with an `HtmlBlock`

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