Comparing version 4.0.0 to 4.1.0
@@ -5,2 +5,7 @@ <!--remark setext--> | ||
4.1.0 / 2016-02-16 | ||
================== | ||
* Remove redundant escaped emphasis markers in words ([`b9699bb`](https://github.com/wooorm/remark/commit/b9699bb)) | ||
4.0.0 / 2016-02-14 | ||
@@ -7,0 +12,0 @@ ================== |
@@ -6,3 +6,3 @@ /** | ||
* @module remark | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Markdown processor powered by plugins. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:cli | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Bridge between CLI options and node. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:configuration | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Find remark rc files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:configure | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Configure a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:copy | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Move a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:file-system | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Write a file to the file system. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Process a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:parse | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Parse a file into an AST. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:queue | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Queue all files which came this far. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:read | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Read a file if not already filled. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:stdout | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Write a file to stdout(4). | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:stringify | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Compile an AST into a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:transform | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Transform an AST associated with a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:configure | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Configure a collection of files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:traverse | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Find files from the file-system. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Process a collection of files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:log | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Log a file context on successful completion. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:stdin | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Read from stdin. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:transform | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Transform all files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Collection of virtual files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:traverser | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Get applicable input files from | ||
@@ -9,0 +9,0 @@ * the file system to be processed by remark, respecting |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:ignore | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Find remark ignore files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview CLI Engine. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:spinner | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview A spinner for stdout(4). | ||
@@ -9,0 +9,0 @@ */ |
@@ -5,3 +5,3 @@ /** | ||
* @license MIT | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @module remark:cli:watch-output-cache | ||
@@ -8,0 +8,0 @@ * @fileoverview Cache changed files which are also watched. |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:defaults | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Default values for parse and | ||
@@ -33,2 +33,3 @@ * stringification settings. | ||
'commonmark': false, | ||
'pedantic': false, | ||
'entities': 'false', | ||
@@ -35,0 +36,0 @@ 'setext': false, |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:stringify | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Compile an abstract syntax tree into | ||
@@ -114,2 +114,12 @@ * a markdown document. | ||
/** | ||
* Check whether `character` is alphanumeric. | ||
* | ||
* @param {string} character - Single character to check. | ||
* @return {boolean} - Whether `character` is alphanumeric. | ||
*/ | ||
function isAlphanumeric(character) { | ||
return /\w/.test(character) && character !== UNDERSCORE; | ||
} | ||
/* | ||
@@ -414,2 +424,3 @@ * Entities. | ||
var commonmark = options.commonmark; | ||
var pedantic = options.pedantic; | ||
var siblings = parent && parent.children; | ||
@@ -425,2 +436,4 @@ var index = siblings && siblings.indexOf(node); | ||
var character; | ||
var wordCharBefore; | ||
var wordCharAfter; | ||
@@ -441,3 +454,16 @@ if (prev) { | ||
character === SQUARE_BRACKET_OPEN || | ||
character === UNDERSCORE || | ||
( | ||
character === UNDERSCORE && | ||
/* | ||
* Delegate leading/trailing underscores | ||
* to the multinode version below. | ||
*/ | ||
0 < position && | ||
position < length - 1 && | ||
( | ||
pedantic || | ||
!isAlphanumeric(value.charAt(position - 1)) || | ||
!isAlphanumeric(value.charAt(position + 1)) | ||
) | ||
) || | ||
(self.inLink && character === SQUARE_BRACKET_CLOSE) || | ||
@@ -629,2 +655,54 @@ ( | ||
} | ||
/* | ||
* Escape underscores, but not mid-word (unless | ||
* in pedantic mode). | ||
*/ | ||
wordCharBefore = ( | ||
prev && | ||
prev.type === 'text' && | ||
isAlphanumeric(prev.value.slice(-1)) | ||
); | ||
wordCharAfter = ( | ||
next && | ||
next.type === 'text' && | ||
isAlphanumeric(next.value.charAt(0)) | ||
); | ||
if (length <= 1) { | ||
if ( | ||
value === UNDERSCORE && | ||
( | ||
pedantic || | ||
!wordCharBefore || | ||
!wordCharAfter | ||
) | ||
) { | ||
escaped.unshift(BACKSLASH); | ||
} | ||
} else { | ||
if ( | ||
value.charAt(0) === UNDERSCORE && | ||
( | ||
pedantic || | ||
!wordCharBefore || | ||
!isAlphanumeric(value.charAt(1)) | ||
) | ||
) { | ||
escaped.unshift(BACKSLASH); | ||
} | ||
if ( | ||
value.slice(-1) === UNDERSCORE && | ||
( | ||
pedantic || | ||
!wordCharAfter || | ||
!isAlphanumeric(value.slice(-2)[0]) | ||
) | ||
) { | ||
escaped.splice(escaped.length - 1, 0, BACKSLASH); | ||
} | ||
} | ||
} | ||
@@ -631,0 +709,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:utilities | ||
* @version 4.0.0 | ||
* @version 4.1.0 | ||
* @fileoverview Collection of tiny helpers useful for | ||
@@ -9,0 +9,0 @@ * both parsing and compiling markdown. |
{ | ||
"name": "remark", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Markdown processor powered by plugins", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
369277
10172