Comparing version 4.0.0-alpha.4 to 4.0.0
@@ -5,2 +5,22 @@ <!--remark setext--> | ||
4.0.0 / 2016-02-14 | ||
================== | ||
* Update to make sure plug-ins are used over files ([`e445030`](https://github.com/wooorm/remark/commit/e445030)) | ||
* Update unified ([`2e17441`](https://github.com/wooorm/remark/commit/2e17441)) | ||
* Add support for syntax tree input to remark(1) ([`86bb88e`](https://github.com/wooorm/remark/commit/86bb88e)) | ||
* Remove support for Duo ([`480b01a`](https://github.com/wooorm/remark/commit/480b01a)) | ||
* Refactor how compiler picks visitors ([`bfb5812`](https://github.com/wooorm/remark/commit/bfb5812)) | ||
* Rename `link`, `src`, `href` properties to `url` ([`801a1b6`](https://github.com/wooorm/remark/commit/801a1b6)) | ||
* Remove `undefined` value for `checked` on list-items ([`d0452d3`](https://github.com/wooorm/remark/commit/d0452d3)) | ||
* Rename `horizontalRule` to `thematicBreak` ([`67b36a0`](https://github.com/wooorm/remark/commit/67b36a0)) | ||
* Add `offset`s to nodes when parsing in remark(3) ([`070d977`](https://github.com/wooorm/remark/commit/070d977)) | ||
* Remove `tableHeader` definition ([`593bb82`](https://github.com/wooorm/remark/commit/593bb82)) | ||
3.2.3 / 2016-02-07 | ||
================== | ||
* Fix entities in shortcut and collapsed references ([`bb1683a`](https://github.com/wooorm/remark/commit/bb1683a)) | ||
* Fix subdomains for literal URLs in remark(3) ([`8ff7ab4`](https://github.com/wooorm/remark/commit/8ff7ab4)) | ||
3.2.2 / 2016-01-21 | ||
@@ -7,0 +27,0 @@ ================== |
@@ -6,3 +6,3 @@ /** | ||
* @module remark | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Markdown processor powered by plugins. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:cli | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Bridge between CLI options and node. | ||
@@ -242,7 +242,9 @@ */ | ||
.option('-w, --watch', 'watch for changes and reprocess', false) | ||
.option('-a, --ast', 'output AST information', false) | ||
.option('-q, --quiet', 'output only warnings and errors', false) | ||
.option('-S, --silent', 'output only errors', false) | ||
.option('-f, --frail', 'exit with 1 on warnings', false) | ||
.option('-t, --tree', 'input and output syntax tree', false) | ||
.option('--file-path <path>', 'specify file path to process as', false) | ||
.option('--tree-out', 'output syntax tree', false) | ||
.option('--tree-in', 'input syntax tree', false) | ||
.option('--no-stdout', 'disable writing to stdout', true) | ||
@@ -295,3 +297,5 @@ .option('--no-color', 'disable color in output', false) | ||
self.out = program.stdout; | ||
self.ast = program.ast; | ||
self.treeIn = program.treeIn || program.tree; | ||
self.treeOut = program.treeOut || program.tree; | ||
self.tree = program.tree || (self.treeIn && self.treeOut); | ||
self.detectRC = program.rc; | ||
@@ -314,3 +318,5 @@ self.detectIgnore = program.ignore; | ||
self.out = config.stdout; | ||
self.ast = config.ast; | ||
self.treeIn = config.treeIn || config.tree; | ||
self.treeOut = config.treeOut || config.tree; | ||
self.tree = config.tree || (config.treeIn && config.treeOut); | ||
self.detectRC = config.detectRC; | ||
@@ -317,0 +323,0 @@ self.detectIgnore = config.detectIgnore; |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:configuration | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Find remark rc files. | ||
@@ -24,3 +24,3 @@ */ | ||
var findUp = require('vfile-find-up'); | ||
var extend = require('extend.js'); | ||
var extend = require('extend'); | ||
var defaults = require('../defaults'); | ||
@@ -27,0 +27,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:configure | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Configure a file. | ||
@@ -76,19 +76,13 @@ */ | ||
* | ||
* - `$package/node_modules/remark-$pathlike`; | ||
* - `$cwd/node_modules/remark-$pathlike`; | ||
* - `$modules/remark-$pathlike` (if global). | ||
* - `$package/$pathlike`; | ||
* - `$package/$pathlike.js`; | ||
* - `$package/node_modules/$pathlike`; | ||
* - `$package/node_modules/remark-$pathlike`; | ||
* - `$cwd/node_modules/$pathlike`; | ||
* - `$cwd/node_modules/remark-$pathlike`; | ||
* - `$pathlike`. | ||
* - `$modules/$pathlike` (if global); | ||
* | ||
* Where `$package` is an ancestral package directory. | ||
* | ||
* When using a globally installed executable, the | ||
* following are also included: | ||
* | ||
* - `$modules/$pathlike`; | ||
* - `$modules/remark-$pathlike`. | ||
* | ||
* Where `$modules` is the directory of globally installed | ||
* Where `$package` is an ancestral package directory, | ||
* and `$modules` is the directory of globally installed | ||
* npm packages. | ||
@@ -116,15 +110,19 @@ * | ||
var paths = [ | ||
resolve(root, MODULES, pluginlike), | ||
resolve(cwd, MODULES, pluginlike) | ||
]; | ||
if (isGlobal) { | ||
paths.push(resolve(globals, pluginlike)); | ||
} | ||
paths.push( | ||
resolve(root, pathlike), | ||
resolve(root, pathlike + '.js'), | ||
resolve(root, MODULES, pluginlike), | ||
resolve(root, MODULES, pathlike), | ||
resolve(cwd, MODULES, pluginlike), | ||
resolve(cwd, MODULES, pathlike) | ||
]; | ||
); | ||
if (isGlobal) { | ||
paths.push( | ||
resolve(globals, pathlike), | ||
resolve(globals, pluginlike) | ||
); | ||
paths.push(resolve(globals, pathlike)); | ||
} | ||
@@ -131,0 +129,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:copy | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Move a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:file-system | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Write a file to the file system. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Process a file. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:parse | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Parse a file into an AST. | ||
@@ -29,3 +29,3 @@ */ | ||
* | ||
* vat settings = {'position': false}; | ||
* var settings = {'position': false}; | ||
* | ||
@@ -45,2 +45,16 @@ * parse({'file': file, 'settings': settings}); | ||
if (context.fileSet.cli.treeIn) { | ||
debug('Not parsing already parsed document'); | ||
try { | ||
file.namespace('mdast').tree = JSON.parse(file.toString()); | ||
} catch (err) { | ||
file.fail(err); | ||
} | ||
file.contents = ''; | ||
return; | ||
} | ||
debug('Parsing document'); | ||
@@ -47,0 +61,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:queue | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Queue all files which came this far. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:read | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Read a file if not already filled. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:stdout | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Write a file to stdout(4). | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:stringify | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Compile an AST into a file. | ||
@@ -43,3 +43,3 @@ */ | ||
if (!context.processor || context.ast) { | ||
if (!context.processor) { | ||
debug('Not compiling failed document'); | ||
@@ -51,3 +51,3 @@ return; | ||
if (cli.ast) { | ||
if (cli.treeOut) { | ||
file.move({ | ||
@@ -54,0 +54,0 @@ 'extension': 'json' |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-pipeline:transform | ||
* @version 3.2.2 | ||
* @version 4.0.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 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Configure a collection of files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:traverse | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Find files from the file-system. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Process a collection of files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:log | ||
* @version 3.2.2 | ||
* @version 4.0.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 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Read from stdin. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set-pipeline:transform | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Transform all files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:file-set | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Collection of virtual files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:traverser | ||
* @version 3.2.2 | ||
* @version 4.0.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 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Find remark ignore files. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview CLI Engine. | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:cli:spinner | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview A spinner for stdout(4). | ||
@@ -9,0 +9,0 @@ */ |
@@ -5,3 +5,3 @@ /** | ||
* @license MIT | ||
* @version 3.2.2 | ||
* @version 4.0.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 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Default values for parse and | ||
@@ -9,0 +9,0 @@ * stringification settings. |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:stringify | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Compile an abstract syntax tree into | ||
@@ -24,3 +24,3 @@ * a markdown document. | ||
var repeat = require('repeat-string'); | ||
var extend = require('extend.js'); | ||
var extend = require('extend'); | ||
var ccount = require('ccount'); | ||
@@ -264,6 +264,4 @@ var longestStreak = require('longest-streak'); | ||
/** | ||
* Encode HTML entities using `he` using bound options. | ||
* Encode HTML entities using the bound options. | ||
* | ||
* @see https://github.com/mathiasbynens/he#strict | ||
* | ||
* @example | ||
@@ -279,7 +277,2 @@ * // When `type` is `'true'`. | ||
* @return {string} - Encoded content. | ||
* @throws {Error} - When `file.quiet` is not `true`. | ||
* However, by default `he` does not throw on | ||
* parse errors, but when | ||
* `he.encode.options.strict: true`, they occur on | ||
* invalid HTML. | ||
*/ | ||
@@ -294,12 +287,14 @@ function encoder(value) { | ||
/** | ||
* Check if a string starts with HTML entity. | ||
* Returns the length of HTML entity that is a prefix of | ||
* the given string (excluding the ampersand), 0 if it | ||
* does not start with an entity. | ||
* | ||
* @example | ||
* startsWithEntity('©cat') // true | ||
* startsWithEntity('&foo & &bar') // false | ||
* entityPrefixLength('©cat') // 4 | ||
* entityPrefixLength('&foo & &bar') // 0 | ||
* | ||
* @param {string} value - Value to check. | ||
* @return {boolean} - Whether `value` starts an entity. | ||
* @param {string} value - Input string. | ||
* @return {number} - Length of an entity. | ||
*/ | ||
function startsWithEntity(value) { | ||
function entityPrefixLength(value) { | ||
var prefix; | ||
@@ -311,3 +306,3 @@ | ||
if (value.charAt(0) !== AMPERSAND) { | ||
return false; | ||
return 0; | ||
} | ||
@@ -317,6 +312,20 @@ | ||
return decode(prefix).length !== prefix.length; | ||
return prefix.length - decode(prefix).length; | ||
} | ||
/** | ||
* Checks if a string starts with HTML entity. | ||
* | ||
* @example | ||
* startsWithEntity('©cat') // true | ||
* startsWithEntity('&foo & &bar') // false | ||
* | ||
* @param {string} value - Value to check. | ||
* @return {number} - Whether `value` starts an entity. | ||
*/ | ||
function startsWithEntity(value) { | ||
return entityPrefixLength(value) > 0; | ||
} | ||
/** | ||
* Check if `character` is a valid alignment row character. | ||
@@ -830,2 +839,36 @@ * | ||
/** | ||
* Shortcut and collapsed link references need no escaping | ||
* and encoding during the processing of child nodes (it | ||
* must be implied from identifier). | ||
* | ||
* This toggler turns encoding and escaping off for shortcut | ||
* and collapsed references. | ||
* | ||
* Implies `enterLink`. | ||
* | ||
* @param {Compiler} compiler - Compiler instance. | ||
* @param {LinkReference} node - LinkReference node. | ||
* @return {Function} - Exit state. | ||
*/ | ||
compilerPrototype.enterLinkReference = function (compiler, node) { | ||
var encode = compiler.encode; | ||
var escape = compiler.escape; | ||
var exitLink = compiler.enterLink(); | ||
if ( | ||
node.referenceType === 'shortcut' || | ||
node.referenceType === 'collapsed' | ||
) { | ||
compiler.encode = compiler.escape = encodeNoop; | ||
return function () { | ||
compiler.encode = encode; | ||
compiler.escape = escape; | ||
exitLink(); | ||
}; | ||
} else { | ||
return exitLink; | ||
} | ||
}; | ||
/** | ||
* Visit a node. | ||
@@ -1828,19 +1871,21 @@ * | ||
/** | ||
* For shortcut reference links, the contents is also an | ||
* identifier, and for identifiers extra backslashes do | ||
* matter. | ||
* For shortcut and collapsed reference links, the contents | ||
* is also an identifier, so we need to restore the original | ||
* encoding and escaping that were present in the source | ||
* string. | ||
* | ||
* This function takes an escaped value from shortcut's children | ||
* and an identifier and removes extra backslashes. | ||
* This function takes the unescaped & unencoded value from | ||
* shortcut's child nodes and the identifier and encodes | ||
* the former according to the latter. | ||
* | ||
* @example | ||
* unescapeShortcutLinkReference('a\\*b', 'a*b') | ||
* // 'a*b' | ||
* copyIdentifierEncoding('a*b', 'a\\*b*c') | ||
* // 'a\\*b*c' | ||
* | ||
* @param {string} value - Escaped and stringified link value. | ||
* @param {string} identifier - Link identifier, in one of its | ||
* equivalent forms. | ||
* @return {string} - Link value with some characters unescaped. | ||
* @param {string} value - Unescaped and unencoded stringified | ||
* link value. | ||
* @param {string} identifier - Link identifier. | ||
* @return {string} - Encoded link value. | ||
*/ | ||
function unescapeShortcutLinkReference(value, identifier) { | ||
function copyIdentifierEncoding(value, identifier) { | ||
var index = 0; | ||
@@ -1888,2 +1933,5 @@ var position = 0; | ||
) { | ||
if (identifier.charAt(position) === AMPERSAND) { | ||
position += entityPrefixLength(identifier.slice(position)); | ||
} | ||
position += 1; | ||
@@ -1929,9 +1977,12 @@ } | ||
var self = this; | ||
var exitLink = self.enterLink(); | ||
var exitLinkReference = self.enterLinkReference(self, node); | ||
var value = self.all(node).join(EMPTY); | ||
exitLink(); | ||
exitLinkReference(); | ||
if (node.referenceType == 'shortcut') { | ||
value = unescapeShortcutLinkReference(value, node.identifier); | ||
if ( | ||
node.referenceType === 'shortcut' || | ||
node.referenceType === 'collapsed' | ||
) { | ||
value = copyIdentifierEncoding(value, node.identifier); | ||
} | ||
@@ -1938,0 +1989,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
* @module remark:utilities | ||
* @version 3.2.2 | ||
* @version 4.0.0 | ||
* @fileoverview Collection of tiny helpers useful for | ||
@@ -9,0 +9,0 @@ * both parsing and compiling markdown. |
{ | ||
"name": "remark", | ||
"version": "4.0.0-alpha.4", | ||
"version": "4.0.0", | ||
"description": "Markdown processor powered by plugins", | ||
@@ -29,6 +29,5 @@ "license": "MIT", | ||
"elegant-spinner": "^1.0.0", | ||
"extend.js": "0.0.2", | ||
"glob": "^6.0.1", | ||
"extend": "^3.0.0", | ||
"glob": "^7.0.0", | ||
"globby": "^4.0.0", | ||
"he": "^0.5.0", | ||
"log-update": "^1.0.1", | ||
@@ -45,3 +44,4 @@ "longest-streak": "^1.0.0", | ||
"trim-trailing-lines": "^1.0.0", | ||
"unified": "^2.0.0", | ||
"unified": "^3.0.0", | ||
"unist-util-remove-position": "^1.0.0", | ||
"user-home": "^2.0.0", | ||
@@ -55,2 +55,3 @@ "vfile": "^1.1.0", | ||
}, | ||
"homepage": "http://remark.js.org", | ||
"repository": { | ||
@@ -60,5 +61,8 @@ "type": "git", | ||
}, | ||
"author": "Titus Wormer <tituswormer@gmail.com>", | ||
"bugs": "https://github.com/wooorm/remark/issues", | ||
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
"contributors": [ | ||
"Christopher Jeffrey" | ||
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
"Eugene Sharygin <eush77@gmail.com>", | ||
"YJ Yang <chcokr@gmail.com>" | ||
], | ||
@@ -71,2 +75,5 @@ "bin": { | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"files": [ | ||
@@ -83,3 +90,3 @@ "index.js", | ||
"escodegen": "^1.7.0", | ||
"eslint": "^1.1.0", | ||
"eslint": "^2.0.0", | ||
"esmangle": "^1.0.0", | ||
@@ -91,15 +98,18 @@ "esprima": "^2.6.0", | ||
"mocha": "^2.0.0", | ||
"remark-comment-config": "^3.0.0-alpha.1", | ||
"remark-comment-config": "^3.0.0", | ||
"remark-github": "^4.0.1", | ||
"remark-html": "^3.0.0-alpha.1", | ||
"remark-lint": "^2.0.0", | ||
"remark-man": "^3.0.0-alpha.1", | ||
"remark-html": "^3.0.0", | ||
"remark-license": "^2.0.0", | ||
"remark-lint": "^3.0.0", | ||
"remark-man": "^3.0.0", | ||
"remark-retext": "^1.0.1", | ||
"remark-toc": "^3.0.0-alpha.1", | ||
"remark-usage": "^2.0.0", | ||
"remark-validate-links": "^2.0.0", | ||
"remark-yaml-config": "^3.0.0-alpha.1", | ||
"remark-toc": "^3.0.0", | ||
"remark-usage": "^3.0.0", | ||
"remark-validate-links": "^3.0.0", | ||
"remark-yaml-config": "^3.0.0", | ||
"retext": "^1.0.0", | ||
"retext-equality": "^2.2.1", | ||
"retext-readability": "^1.0.0" | ||
"retext-profanities": "^1.1.0", | ||
"retext-readability": "^1.0.0", | ||
"retext-simplify": "^1.1.0" | ||
}, | ||
@@ -106,0 +116,0 @@ "scripts": { |
@@ -1,7 +0,10 @@ | ||
# ![remark](https://cdn.rawgit.com/wooorm/remark/master/logo.svg) | ||
# ![remark][logo] | ||
[![Build Status](https://img.shields.io/travis/wooorm/remark.svg)](https://travis-ci.org/wooorm/remark) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/remark.svg)](https://codecov.io/github/wooorm/remark) [![Inline docs](https://img.shields.io/badge/docs-A-brightgreen.svg)](http://inch-ci.org/github/wooorm/remark) [![Chat](https://img.shields.io/gitter/room/wooorm/remark.svg)](https://gitter.im/wooorm/remark) | ||
[![Build Status][build-badge]][build-status] | ||
[![Coverage Status][coverage-badge]][coverage-status] | ||
[![Inline docs][docs-badge]][docs-status] | ||
[![Chat][chat-badge]][chat] | ||
> **remark** recently changed its name from **mdast**. [Read more about | ||
> what changed and how to migrate »](https://github.com/wooorm/remark/releases/tag/3.0.0) | ||
> what changed and how to migrate »][migrating] | ||
@@ -12,10 +15,10 @@ **remark** is a markdown processor powered by plugins. Lots of tests. Node, | ||
**remark** is not just another markdown to HTML compiler. It can generate, | ||
and reformat, markdown too. It is powered by [plugins](doc/plugins.md) to do | ||
all kinds of things: [validate your markdown](https://github.com/wooorm/remark-lint), | ||
[add links for GitHub references](https://github.com/wooorm/remark-github), or | ||
[add a table of contents](https://github.com/wooorm/remark-toc). | ||
and reformat, markdown too. Powered by [plugins][] to do | ||
all kinds of things: [validate your markdown][remark-lint], | ||
[add links for GitHub references][remark-github], or | ||
[add a table of contents][remark-toc]. | ||
The project contains both an extensive [JavaScript API](doc/remark.3.md) for | ||
The project has both an extensive [JavaScript API][remark-3] for | ||
parsing, modifying, and compiling markdown, and a friendly [Command Line | ||
Interface](doc/remark.1.md) making it easy to validate, prepare, and compile | ||
Interface][remark-1] making it easy to validate, prepare, and compile | ||
markdown in a build step. | ||
@@ -40,3 +43,3 @@ | ||
[npm](https://docs.npmjs.com/cli/install): | ||
[npm][]: | ||
@@ -47,3 +50,3 @@ ```bash | ||
[Read more about alternative ways to install and use »](doc/installation.md) | ||
[Read more about alternative ways to install and use »][install] | ||
@@ -89,3 +92,3 @@ ## Usage | ||
[**Get Started with the API** »](doc/getting-started.md#application-programming-interface) | ||
[**Get Started with the API** »][start-api] | ||
@@ -147,3 +150,3 @@ ### `remark.process(value[, options][, done])` | ||
Change the way [`remark`](#api) works by using a [`plugin`](doc/plugins.md). | ||
Change the way [`remark`][api] works by using a [`plugin`][plugins]. | ||
@@ -157,4 +160,4 @@ **Signatures** | ||
* `plugin` (`Function`) — A [**Plugin**](doc/plugins.md); | ||
* `plugins` (`Array.<Function>`) — A list of [**Plugin**](doc/plugins.md)s; | ||
* `plugin` (`Function`) — A [**Plugin**][plugins]; | ||
* `plugins` (`Array.<Function>`) — A list of [**Plugin**][plugins]s; | ||
* `options` (`Object?`) — Passed to plugin. Specified by its documentation. | ||
@@ -166,3 +169,3 @@ | ||
**remark** (it has the same methods), but caches the `use`d plugins. This | ||
provides the ability to chain `use` calls to use multiple plugins, but | ||
provides the ability to chain `use` calls to use more than one plugin, but | ||
ensures the functioning of the **remark** module does not change for other | ||
@@ -173,3 +176,3 @@ dependents. | ||
[**Get Started with the CLI** »](doc/getting-started.md#command-line-interface) | ||
[**Get Started with the CLI** »][start-cli] | ||
@@ -200,7 +203,9 @@ Install: | ||
-w, --watch watch for changes and reprocess | ||
-a, --ast output AST information | ||
-q, --quiet output only warnings and errors | ||
-S, --silent output only errors | ||
-f, --frail exit with 1 on warnings | ||
-t, --tree input and output syntax tree | ||
--file-path <path> specify file path to process as | ||
--tree-out output syntax tree | ||
--tree-in input syntax tree | ||
--no-stdout disable writing to stdout | ||
@@ -232,8 +237,48 @@ --no-color disable color in output | ||
<!-- Definitions --> | ||
[logo]: https://cdn.rawgit.com/wooorm/remark/master/logo.svg | ||
[build-badge]: https://img.shields.io/travis/wooorm/remark.svg | ||
[build-status]: https://travis-ci.org/wooorm/remark | ||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/remark.svg | ||
[coverage-status]: https://codecov.io/github/wooorm/remark | ||
[docs-badge]: https://img.shields.io/badge/docs-A-brightgreen.svg | ||
[docs-status]: http://inch-ci.org/github/wooorm/remark | ||
[chat-badge]: https://img.shields.io/gitter/room/wooorm/remark.svg | ||
[chat]: https://gitter.im/wooorm/remark | ||
[npm]: https://docs.npmjs.com/cli/install | ||
[migrating]: https://github.com/wooorm/remark/releases/tag/3.0.0 | ||
[remark-lint]: https://github.com/wooorm/remark-lint | ||
[remark-github]: https://github.com/wooorm/remark-github | ||
[remark-toc]: https://github.com/wooorm/remark-toc | ||
[remark-1]: doc/remark.1.md | ||
[remark-3]: doc/remark.3.md | ||
[plugins]: doc/plugins.md | ||
[install]: doc/installation.md | ||
[start-api]: doc/getting-started.md#application-programming-interface | ||
[start-cli]: doc/getting-started.md#command-line-interface | ||
[api]: #api | ||
## License | ||
[MIT](LICENSE) © [Titus Wormer](http://wooorm.com) | ||
> This project was initially a fork of [marked](https://github.com/chjj/marked). | ||
Copyright (c) 2011-2014, Christopher Jeffrey. (MIT License) |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
366674
10099
0
275
27
+ Addedextend@^3.0.0
+ Addedattach-ware@2.0.5(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedunified@3.0.0(transitive)
+ Addedunist-util-is@3.0.0(transitive)
+ Addedunist-util-remove-position@1.1.4(transitive)
+ Addedunist-util-visit@1.4.1(transitive)
+ Addedunist-util-visit-parents@2.1.2(transitive)
- Removedextend.js@0.0.2
- Removedhe@^0.5.0
- Removedattach-ware@1.1.1(transitive)
- Removedextend.js@0.0.2(transitive)
- Removedhe@0.5.0(transitive)
- Removedunified@2.1.4(transitive)
Updatedglob@^7.0.0
Updatedunified@^3.0.0