Comparing version 0.27.1 to 0.27.2
38
index.js
@@ -0,1 +1,9 @@ | ||
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast | ||
* @fileoverview Markdown processor powered by plugins. | ||
*/ | ||
'use strict'; | ||
@@ -8,6 +16,6 @@ | ||
var Ware = require('ware'); | ||
var VFile = require('vfile'); | ||
var extend = require('extend.js'); | ||
var parser = require('./lib/parse.js'); | ||
var stringifier = require('./lib/stringify.js'); | ||
var File = require('./lib/file.js'); | ||
var utilities = require('./lib/utilities.js'); | ||
@@ -189,3 +197,3 @@ | ||
* @param {Node} ast | ||
* @param {File?} [file] | ||
* @param {VFile?} [file] | ||
* @param {Function?} [done] | ||
@@ -202,3 +210,3 @@ * @return {Node} - `ast`. | ||
file = new File(file); | ||
file = new VFile(file); | ||
@@ -228,3 +236,6 @@ done = typeof done === 'function' ? done : fail; | ||
function parse(value, options) { | ||
return parser.call(this, new File(value), options); | ||
var file = new VFile(value); | ||
var ast = file.namespace('mdast').ast = parser.call(this, file, options); | ||
return ast; | ||
} | ||
@@ -241,3 +252,14 @@ | ||
return stringifier.call(this, ast, new File(file), options); | ||
if (!file && ast && !ast.type) { | ||
file = ast; | ||
ast = null; | ||
} | ||
file = new VFile(file); | ||
if (!ast) { | ||
ast = file.namespace('mdast').ast || ast; | ||
} | ||
return stringifier.call(this, ast, file, options); | ||
} | ||
@@ -248,3 +270,3 @@ | ||
* | ||
* @param {string|File} value | ||
* @param {string|VFile} value | ||
* @param {Object?} [options] | ||
@@ -255,3 +277,3 @@ * @param {Function?} [done] | ||
function process(value, options, done) { | ||
var file = new File(value); | ||
var file = new VFile(value); | ||
var self = this instanceof MDAST ? this : new MDAST(); | ||
@@ -288,3 +310,3 @@ var result = null; | ||
ast = self.parse(file, options); | ||
file.ast = ast; | ||
self.run(ast, file, callback); | ||
@@ -291,0 +313,0 @@ |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:cli | ||
@@ -5,0 +6,0 @@ * @fileoverview Bridge between CLI options and node. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:configuration | ||
@@ -5,0 +6,0 @@ * @fileoverview Find mdast rc files. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:configure | ||
@@ -5,0 +6,0 @@ * @fileoverview Configure a file. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:copy | ||
@@ -5,0 +6,0 @@ * @fileoverview Move a file. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:file-system | ||
@@ -55,3 +56,3 @@ * @fileoverview Write a file to the file system. | ||
if (!file.providedByUser) { | ||
if (!file.namespace('mdast:cli').providedByUser) { | ||
debug('Ignoring programmatically added file'); | ||
@@ -58,0 +59,0 @@ |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline | ||
@@ -5,0 +6,0 @@ * @fileoverview Process a file. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:log | ||
@@ -40,2 +41,3 @@ * @fileoverview Log a file context on successful completion. | ||
var fn = cli.log.bind(cli); | ||
var space = file.namespace('mdast:cli'); | ||
var fromPath; | ||
@@ -50,5 +52,5 @@ var result; | ||
fromPath = file.originalPath || file.filePath(); | ||
fromPath = space.originalPath || file.filePath(); | ||
if (!file.providedByUser) { | ||
if (!space.providedByUser) { | ||
debug('Ignoring programmatically added file'); | ||
@@ -55,0 +57,0 @@ |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:parse | ||
@@ -28,3 +29,3 @@ * @fileoverview Parse a file into an AST. | ||
* | ||
* file.ast.type; // 'root' | ||
* file.namespace('mdast').ast.type; // 'root' | ||
* | ||
@@ -42,3 +43,3 @@ * @param {Object} context | ||
file.ast = context.processor.parse(file, context.settings); | ||
context.processor.parse(file, context.settings); | ||
@@ -45,0 +46,0 @@ debug('Parsed document'); |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:queue | ||
@@ -25,3 +26,3 @@ * @fileoverview Queue all files which came this far. | ||
* | ||
* file.originalPath = '~/foo/bar.md'; | ||
* file.namespace('mdast:cli').originalPath = '~/foo/bar.md'; | ||
* fileSet.add(file); | ||
@@ -36,3 +37,3 @@ * | ||
var fileSet = context.fileSet; | ||
var original = context.file.originalPath; | ||
var original = context.file.namespace('mdast:cli').originalPath; | ||
var complete = true; | ||
@@ -50,3 +51,3 @@ var map = fileSet.complete; | ||
fileSet.valueOf().forEach(function (file) { | ||
var key = file.originalPath; | ||
var key = file.namespace('mdast:cli').originalPath; | ||
@@ -53,0 +54,0 @@ if (file.hasFailed()) { |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:read | ||
@@ -5,0 +6,0 @@ * @fileoverview Read a file if not already filled. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:stdout | ||
@@ -49,3 +50,3 @@ * @fileoverview Write a file to stdout. | ||
if (fileSet.length === 1 && (!context.output || !file.filePath())) { | ||
if (!file.providedByUser) { | ||
if (!file.namespace('mdast:cli').providedByUser) { | ||
debug('Ignoring programmatically added file'); | ||
@@ -52,0 +53,0 @@ |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:stringify | ||
@@ -50,5 +51,5 @@ * @fileoverview Compile an AST into a file. | ||
value = JSON.stringify(file.ast, null, 2); | ||
value = JSON.stringify(file.namespace('mdast').ast, null, 2); | ||
} else { | ||
value = context.processor.stringify(file.ast, file, context.settings); | ||
value = context.processor.stringify(file, context.settings); | ||
} | ||
@@ -55,0 +56,0 @@ |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-pipeline:transform | ||
@@ -23,3 +24,3 @@ * @fileoverview Transform an AST associated with a file. | ||
* | ||
* file.ast = { | ||
* file.namespace('mdast').ast = { | ||
* 'type': 'paragraph', | ||
@@ -47,3 +48,3 @@ * 'children': [{ | ||
context.processor.run(file.ast, file, function (err) { | ||
context.processor.run(file.namespace('mdast').ast, file, function (err) { | ||
debug('Transformed document (error: %s)', err); | ||
@@ -50,0 +51,0 @@ |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-set-pipeline:configure | ||
@@ -5,0 +6,0 @@ * @fileoverview Configure a collection of files. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-set-pipeline | ||
@@ -5,0 +6,0 @@ * @fileoverview Process a collection of files. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-set-pipeline:stdin | ||
@@ -16,4 +17,4 @@ * @fileoverview Read from stdin. | ||
var debug = require('debug')('mdast:cli:file-set-pipeline:stdin'); | ||
var VFile = require('vfile'); | ||
var concat = require('concat-stream'); | ||
var File = require('../../file'); | ||
@@ -75,3 +76,3 @@ /* | ||
var extension = filePath && extname(filePath); | ||
var file = new File(filePath ? { | ||
var file = new VFile(filePath ? { | ||
'directory': dirname(filePath), | ||
@@ -81,2 +82,3 @@ 'filename': basename(filePath, extension), | ||
} : {}); | ||
var space = file.namespace('mdast:cli'); | ||
@@ -88,6 +90,7 @@ debug('Read from stdin'); | ||
file.quiet = true; | ||
file.exists = true; | ||
file.isFile = true; | ||
file.providedByUser = true; | ||
space.exists = true; | ||
space.isFile = true; | ||
space.providedByUser = true; | ||
program.files = [file]; | ||
@@ -94,0 +97,0 @@ |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-set-pipeline:transform | ||
@@ -5,0 +6,0 @@ * @fileoverview Transform all files. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-set-pipeline:traverse | ||
@@ -5,0 +6,0 @@ * @fileoverview Find files from the file-system. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:file-set | ||
@@ -16,4 +17,4 @@ * @fileoverview Collection of virtual files. | ||
var ware = require('ware'); | ||
var VFile = require('vfile'); | ||
var filePipeline = require('./file-pipeline'); | ||
var File = require('../file'); | ||
@@ -174,3 +175,3 @@ /* | ||
file = new File({ | ||
file = new VFile({ | ||
'directory': dirname(file), | ||
@@ -190,3 +191,3 @@ 'filename': basename(file, extension), | ||
file.originalPath = originalPath; | ||
file.namespace('mdast:cli').originalPath = originalPath; | ||
@@ -193,0 +194,0 @@ self.length++; |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:finder | ||
@@ -5,0 +6,0 @@ * @fileoverview Find one or more files by searching |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:ignore | ||
@@ -5,0 +6,0 @@ * @fileoverview Find mdast ignore files. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli | ||
@@ -5,0 +6,0 @@ * @fileoverview CLI Engine. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:cli:traverser | ||
@@ -20,3 +21,3 @@ * @fileoverview Get applicable input files from | ||
var minimatch = require('minimatch'); | ||
var File = require('../file'); | ||
var VFile = require('vfile'); | ||
var Ignore = require('./ignore'); | ||
@@ -99,4 +100,5 @@ | ||
var directory = dirname(filePath); | ||
var space; | ||
var file = new File({ | ||
var file = new VFile({ | ||
'directory': directory, | ||
@@ -107,7 +109,10 @@ 'filename': name, | ||
space = file.namespace('mdast:cli'); | ||
file.quiet = true; | ||
file.exists = real; | ||
file.isFile = real ? stat(resolve(filePath)).isFile() : null; | ||
file.providedByUser = true; | ||
space.exists = real; | ||
space.isFile = real ? stat(resolve(filePath)).isFile() : null; | ||
space.providedByUser = true; | ||
return file; | ||
@@ -132,2 +137,3 @@ } | ||
var file = toFile(filePath); | ||
var space = file.namespace('mdast:cli'); | ||
@@ -137,7 +143,7 @@ if (this.isApplicable(file)) { | ||
if (!file.exists || (!file.isFile && file.hasFailed())) { | ||
if (!space.exists || (!space.isFile && file.hasFailed())) { | ||
return file; | ||
} | ||
return file.isFile ? file : this.all(readdir(filePath), filePath); | ||
return space.isFile ? file : this.all(readdir(filePath), filePath); | ||
} | ||
@@ -196,4 +202,5 @@ | ||
var isIgnored = this.shouldIgnore(file.filePath()); | ||
var space = file.namespace('mdast:cli'); | ||
if (!file.exists) { | ||
if (!space.exists) { | ||
file.fail('No such file or directory'); | ||
@@ -219,3 +226,3 @@ | ||
if (!file.isFile || file.hasFailed()) { | ||
if (!space.isFile || file.hasFailed()) { | ||
return !(name.charAt(0) === '.' && name.length !== 1); | ||
@@ -222,0 +229,0 @@ } |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @module Defaults | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:defaults | ||
* @fileoverview Default values for parse and | ||
@@ -6,0 +7,0 @@ * stringification settings. |
@@ -15,7 +15,7 @@ /* This file is generated by `script/build-expressions.js` */ | ||
'blockquote': /^(?=[ \t]*>)(?:(?:(?:[ \t]*>[^\n]*\n)*(?:[ \t]*>[^\n]+(?=\n|$))|(?![ \t]*>)(?![ \t]*\[((?:[^\\](?:\\|\\(?:\\{2})+)\]|[^\]])+)\]:[ \t\n]*(<[^>\[\]]+>|[^\s\[\]]+)(?:[ \t\n]+['"(]((?:[^\n]|\n(?!\n))*?)['")])?[ \t]*(?=\n|$))[^\n]+)(?:\n|$))*(?:[ \t]*>[ \t]*(?:\n[ \t]*>[ \t]*)*)?/, | ||
'html': /^(?:[ \t]*(?:(?:(?:<(?:article|header|aside|hgroup|blockquote|hr|iframe|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)(?:(?:\s+)(?:[a-zA-Z_:][a-zA-Z0-9_.:-]*)(?:(?:\s+)?=(?:\s+)?(?:[^"'=<>`]+|'[^']*'|"[^"]*"))?)*(?:\s+)?\/?>?)|(?:<\/(?:article|header|aside|hgroup|blockquote|hr|iframe|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)(?:\s+)?>))|(?:<!--(?!-?>)(?:[^-]|-(?!-))*-->)|(?:<\?(?:[^\?]|\?(?!>))+\?>)|(?:<![a-zA-Z]+\s+[\s\S]+?>)|(?:<!\[CDATA\[[\s\S]+?\]\]>))[\s\S]*?[ \t]*?(?:\n{2,}|\s*$))/i, | ||
'html': /^(?:[ \t]*(?:(?:(?:<(?:article|header|aside|hgroup|blockquote|hr|iframe|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)(?:(?:\s+)(?:[a-zA-Z_:][a-zA-Z0-9_.:-]*)(?:(?:\s+)?=(?:\s+)?(?:[^"'=<>`]+|'[^']*'|"[^"]*"))?)*(?:\s+)?\/?>?)|(?:<\/(?:article|header|aside|hgroup|blockquote|hr|iframe|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)(?:\s+)?>))|<!--[\s\S]*?-->|(?:<\?(?:[^\?]|\?(?!>))+\?>)|(?:<![a-zA-Z]+\s+[\s\S]+?>)|(?:<!\[CDATA\[[\s\S]+?\]\]>))[\s\S]*?[ \t]*?(?:\n{2,}|\s*$))/i, | ||
'paragraph': /^(?:(?:[^\n]+\n?(?![ \t]*([-*_])( *\1){2,} *(?=\n|$)|([ \t]*)(#{1,6})(?:([ \t]+)([^\n]+?))??(?:[ \t]+#+)?[ \t]*(?=\n|$)|(\ {0,3})([^\n]+?)[ \t]*\n\ {0,3}(=|-){1,}[ \t]*(?=\n|$)|[ \t]*\[((?:[^\\](?:\\|\\(?:\\{2})+)\]|[^\]])+)\]:[ \t\n]*(<[^>\[\]]+>|[^\s\[\]]+)(?:[ \t\n]+['"(]((?:[^\n]|\n(?!\n))*?)['")])?[ \t]*(?=\n|$)|(?=[ \t]*>)(?:(?:(?:[ \t]*>[^\n]*\n)*(?:[ \t]*>[^\n]+(?=\n|$))|(?![ \t]*>)(?![ \t]*\[((?:[^\\](?:\\|\\(?:\\{2})+)\]|[^\]])+)\]:[ \t\n]*(<[^>\[\]]+>|[^\s\[\]]+)(?:[ \t\n]+['"(]((?:[^\n]|\n(?!\n))*?)['")])?[ \t]*(?=\n|$))[^\n]+)(?:\n|$))*(?:[ \t]*>[ \t]*(?:\n[ \t]*>[ \t]*)*)?|<(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\b)(?!mailto:)\w+(?!:\/|[^\w\s@]*@)\b))+)/, | ||
'escape': /^\\([\\`*{}\[\]()#+\-.!_>])/, | ||
'autoLink': /^<([^ >]+(@|:\/)[^ >]+)>/, | ||
'tag': /^(?:(?:<(?:[a-zA-Z][a-zA-Z0-9]*)(?:(?:\s+)(?:[a-zA-Z_:][a-zA-Z0-9_.:-]*)(?:(?:\s+)?=(?:\s+)?(?:[^"'=<>`]+|'[^']*'|"[^"]*"))?)*(?:\s+)?\/?>)|(?:<\/(?:[a-zA-Z][a-zA-Z0-9]*)(?:\s+)?>)|(?:<!--(?!-?>)(?:[^-]|-(?!-))*-->)|(?:<\?(?:[^\?]|\?(?!>))+\?>)|(?:<![a-zA-Z]+\s+[\s\S]+?>)|(?:<!\[CDATA\[[\s\S]+?\]\]>))/, | ||
'tag': /^(?:(?:<(?:[a-zA-Z][a-zA-Z0-9]*)(?:(?:\s+)(?:[a-zA-Z_:][a-zA-Z0-9_.:-]*)(?:(?:\s+)?=(?:\s+)?(?:[^"'=<>`]+|'[^']*'|"[^"]*"))?)*(?:\s+)?\/?>)|(?:<\/(?:[a-zA-Z][a-zA-Z0-9]*)(?:\s+)?>)|<!--[\s\S]*?-->|(?:<\?(?:[^\?]|\?(?!>))+\?>)|(?:<![a-zA-Z]+\s+[\s\S]+?>)|(?:<!\[CDATA\[[\s\S]+?\]\]>))/, | ||
'strong': /^(_)_((?:\\[\s\S]|[^\\])+?)__(?!_)|^(\*)\*((?:\\[\s\S]|[^\\])+?)\*\*(?!\*)/, | ||
@@ -56,2 +56,4 @@ 'emphasis': /^\b(_)((?:__|\\[\s\S]|[^\\])+?)_\b|^(\*)((?:\*\*|\\[\s\S]|[^\\])+?)\*(?!\*)/, | ||
'indent': /^([ \t]*)((?:[*+-]|\d+[\.\)]))( {1,4}(?! )| |\t)/, | ||
'html': /^(?:[ \t]*(?:(?:(?:<(?:article|header|aside|hgroup|blockquote|hr|iframe|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)(?:(?:\s+)(?:[a-zA-Z_:][a-zA-Z0-9_.:-]*)(?:(?:\s+)?=(?:\s+)?(?:[^"'=<>`]+|'[^']*'|"[^"]*"))?)*(?:\s+)?\/?>?)|(?:<\/(?:article|header|aside|hgroup|blockquote|hr|iframe|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)(?:\s+)?>))|(?:<!--(?!-?>)(?:[^-]|-(?!-))*-->)|(?:<\?(?:[^\?]|\?(?!>))+\?>)|(?:<![a-zA-Z]+\s+[\s\S]+?>)|(?:<!\[CDATA\[[\s\S]+?\]\]>))[\s\S]*?[ \t]*?(?:\n{2,}|\s*$))/i, | ||
'tag': /^(?:(?:<(?:[a-zA-Z][a-zA-Z0-9]*)(?:(?:\s+)(?:[a-zA-Z_:][a-zA-Z0-9_.:-]*)(?:(?:\s+)?=(?:\s+)?(?:[^"'=<>`]+|'[^']*'|"[^"]*"))?)*(?:\s+)?\/?>)|(?:<\/(?:[a-zA-Z][a-zA-Z0-9]*)(?:\s+)?>)|(?:<!--(?!-?>)(?:[^-]|-(?!-))*-->)|(?:<\?(?:[^\?]|\?(?!>))+\?>)|(?:<![a-zA-Z]+\s+[\s\S]+?>)|(?:<!\[CDATA\[[\s\S]+?\]\]>))/, | ||
'link': /^(!?\[)((?:(?:\[(?:\[(?:\\[\s\S]|[^\[\]])*?\]|\\[\s\S]|[^\[\]])*?\])|\\[\s\S]|[^\[\]])*?)\]\(\s*(?:(?!<)((?:\((?:\\[\s\S]|[^\(\)\s])*?\)|\\[\s\S]|[^\(\)\s])*?)|<([^\n]*?)>)(?:\s+(?:\'((?:\\[\s\S]|[^\'])*?)\'|"((?:\\[\s\S]|[^"])*?)"|\(((?:\\[\s\S]|[^\)])*?)\)))?\s*\)/, | ||
@@ -58,0 +60,0 @@ 'reference': /^(!?\[)((?:(?:\[(?:\[(?:\\[\s\S]|[^\[\]])*?\]|\\[\s\S]|[^\[\]])*?\])|\\[\s\S]|[^\[\]])*?)\]\s*\[((?:\\[\s\S]|[^\[\]])*)\]/, |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @module Stringify | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:stringify | ||
* @fileoverview Compile a an abstract syntax tree into | ||
@@ -6,0 +7,0 @@ * a markdown document. |
/** | ||
* @author Titus Wormer | ||
* @copyright 2015 Titus Wormer. All rights reserved. | ||
* @module Utilities | ||
* @copyright 2015 Titus Wormer | ||
* @license MIT | ||
* @module mdast:utilities | ||
* @fileoverview Collection of tiny helpers useful for | ||
@@ -6,0 +7,0 @@ * both parsing and compiling markdown. |
{ | ||
"name": "mdast", | ||
"version": "0.27.1", | ||
"version": "0.27.2", | ||
"description": "Markdown processor powered by plugins", | ||
@@ -37,2 +37,3 @@ "license": "MIT", | ||
"user-home": "^2.0.0", | ||
"vfile": "^1.0.0", | ||
"ware": "^1.2.0" | ||
@@ -75,3 +76,3 @@ }, | ||
"mdast-usage": "^0.3.0", | ||
"mdast-validate-links": "^0.2.0", | ||
"mdast-validate-links": "^0.3.0", | ||
"mdast-yaml-config": "^0.2.0", | ||
@@ -78,0 +79,0 @@ "mocha": "^2.0.0" |
@@ -120,3 +120,3 @@ # ![mdast](https://cdn.rawgit.com/wooorm/mdast/master/logo.svg) | ||
* [mdast.stringify(ast, options?)](doc/mdast.3.md#mdaststringifyast-options) | ||
* [mdast.stringify(ast, options?)](doc/mdast.3.md#mdaststringifyast-file-options) | ||
— Compiles the syntax tree into a string; | ||
@@ -133,5 +133,2 @@ | ||
* [File()](doc/mdast.3.md#file) | ||
— Wrapper around (virtual) files. | ||
### [mdast](#api).process(value, [options](doc/options.md)?, done?) | ||
@@ -138,0 +135,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
283287
19
40
6811
285
+ Addedvfile@^1.0.0
+ Addedvfile@1.4.0(transitive)