From 4936d35b8a9273cc1d1b92158858afc1f6edcc6f Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 17 Aug 2015 13:41:45 +0200 Subject: [PATCH] Update dependencies --- .mdastrc | 3 +- component.json | 14 +- doc/rules.md | 202 +++++++++--------- history.md | 5 +- lib/index.js | 16 +- mdast-lint.js | 506 ++++++++++++++++++++++++---------------------- mdast-lint.min.js | 2 +- package.json | 33 ++- 8 files changed, 395 insertions(+), 386 deletions(-) diff --git a/.mdastrc b/.mdastrc index 30a0339f..534cd078 100644 --- a/.mdastrc +++ b/.mdastrc @@ -1,9 +1,10 @@ { + "output": true, "plugins": [ "./", "github", "toc", - "yaml-config" + "comment-config" ], "settings": { "bullet": "*" diff --git a/component.json b/component.json index 179a7831..4a5da553 100644 --- a/component.json +++ b/component.json @@ -12,16 +12,16 @@ "repository": "wooorm/mdast-lint", "dependencies": { "sindresorhus/plur": "^2.0.0", - "wooorm/mdast-message-sort": "^0.1.0", - "wooorm/mdast-range": "^0.4.0", - "wooorm/mdast-util-heading-style": "^0.1.0", - "wooorm/mdast-util-position": "^0.2.0", - "wooorm/mdast-util-to-string": "^0.1.0", + "wooorm/mdast-range": "^1.0.0", + "wooorm/mdast-util-heading-style": "^1.0.0", + "wooorm/mdast-util-position": "^1.0.0", + "wooorm/mdast-util-to-string": "^1.0.0", "wooorm/unist-util-visit": "^1.0.0", - "wooorm/mdast-zone": "^0.2.1" + "wooorm/mdast-zone": "^1.0.0", + "wooorm/vfile-sort": "^1.0.0" }, "scripts": [ "index.js", "lib/**/*.js" ] -} +} \ No newline at end of file diff --git a/doc/rules.md b/doc/rules.md index b7baf937..c4f313a2 100644 --- a/doc/rules.md +++ b/doc/rules.md @@ -75,12 +75,12 @@ be null or undefined in order to be ignored. ### externals ````md - - ```json - { - "externals": ["foo", "bar", "baz"] - } - ``` + + ```json + { + "externals": ["foo", "bar", "baz"] + } + ``` ```` Externals contains a list of extra rules to load. @@ -92,13 +92,13 @@ name or a file), but in the browser an object must be passed in. ### reset ````md - - ```json - { - "reset": true, - "final-newline": true - } - ``` + + ```json + { + "reset": true, + "final-newline": true + } + ``` ```` By default, all rules are turned on unless explicitly set to `false`. @@ -197,28 +197,28 @@ Options: `boolean`, default: `false`. ### code-block-style ````md - - Hello - - ... - - World - - - ``` - Hello - ``` - ... - ```bar - World - ``` - - - Hello - ... - ``` - World - ``` + + Hello + + ... + + World + + + ``` + Hello + ``` + ... + ```bar + World + ``` + + + Hello + ... + ``` + World + ``` ```` Warn when code-blocks do not adhere to a given style. @@ -278,28 +278,28 @@ Options: `boolean`, default: `false`. ### fenced-code-flag ````md - - ```hello - world(); - ``` - - - Hello - - - ``` - world(); - ``` - - - ``` - world(); - ``` - - - ```hello - world(); - ``` + + ```hello + world(); + ``` + + + Hello + + + ``` + world(); + ``` + + + ``` + world(); + ``` + + + ```hello + world(); + ``` ```` Warn when fenced code blocks occur without language flag. @@ -317,32 +317,32 @@ Options: `boolean`, default: `false`. ### fenced-code-marker ````md - - ```foo - bar(); - ``` - - ``` - baz(); - ``` - - - ~~~foo - bar(); - ~~~ - - ~~~ - baz(); - ~~~ - - - ~~~foo - bar(); - ~~~ - - ``` - baz(); - ``` + + ```foo + bar(); + ``` + + ``` + baz(); + ``` + + + ~~~foo + bar(); + ~~~ + + ~~~ + baz(); + ~~~ + + + ~~~foo + bar(); + ~~~ + + ``` + baz(); + ``` ```` Warn for violating fenced code markers. @@ -962,24 +962,24 @@ Options: `boolean`, default: `false`. ### no-shell-dollars ````md - - ```bash - $ echo a - $ echo a > file - ``` - - - ```sh - echo a - echo a > file - ``` - - - ```zsh - $ echo a - a - $ echo a > file - ``` + + ```bash + $ echo a + $ echo a > file + ``` + + + ```sh + echo a + echo a > file + ``` + + + ```zsh + $ echo a + a + $ echo a > file + ``` ```` Warn when shell code is prefixed by dollar-characters. diff --git a/history.md b/history.md index dcab2675..67e8ae03 100644 --- a/history.md +++ b/history.md @@ -1,7 +1,4 @@ ---- -mdast: - setext: true ---- + diff --git a/lib/index.js b/lib/index.js index c9161805..541d27d2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -12,9 +12,9 @@ * Dependencies. */ +var sort = require('vfile-sort'); var range = require('mdast-range'); var zone = require('mdast-zone'); -var sort = require('mdast-message-sort'); var internals = require('./rules'); var filter = require('./filter'); @@ -308,17 +308,19 @@ function lint(mdast, options) { 'onparse': onparse })); - /* - * Sort messages. - */ - - mdast.use(sort); - /* * Filter. */ mdast.use(filter); + + /** + * Transformer sort messages. + */ + return function (node, file, next) { + sort(file); + next(); + }; } /* diff --git a/mdast-lint.js b/mdast-lint.js index ca998bb3..e69cf5ca 100644 --- a/mdast-lint.js +++ b/mdast-lint.js @@ -140,7 +140,7 @@ function attacher() { module.exports = attacher; -},{"mdast-util-position":63,"unist-util-visit":65}],3:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],3:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -155,9 +155,9 @@ module.exports = attacher; * Dependencies. */ +var sort = require('vfile-sort'); var range = require('mdast-range'); var zone = require('mdast-zone'); -var sort = require('mdast-message-sort'); var internals = require('./rules'); var filter = require('./filter'); @@ -451,17 +451,19 @@ function lint(mdast, options) { 'onparse': onparse })); - /* - * Sort messages. - */ - - mdast.use(sort); - /* * Filter. */ mdast.use(filter); + + /** + * Transformer sort messages. + */ + return function (node, file, next) { + sort(file); + next(); + }; } /* @@ -470,7 +472,7 @@ function lint(mdast, options) { module.exports = lint; -},{"./filter":2,"./rules":20,"fs":undefined,"mdast-message-sort":60,"mdast-range":61,"mdast-zone":66,"path":undefined}],4:[function(require,module,exports){ +},{"./filter":2,"./rules":20,"fs":undefined,"mdast-range":60,"mdast-zone":64,"path":undefined,"vfile-sort":67}],4:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -580,7 +582,7 @@ function blockquoteIndentation(ast, file, preferred, done) { module.exports = blockquoteIndentation; -},{"mdast-util-position":63,"mdast-util-to-string":64,"unist-util-visit":65,"plur":67}],5:[function(require,module,exports){ +},{"mdast-util-position":62,"mdast-util-to-string":63,"plur":65,"unist-util-visit":66}],5:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -765,7 +767,7 @@ function checkboxCharacterStyle(ast, file, preferred, done) { module.exports = checkboxCharacterStyle; -},{"mdast-util-position":63,"unist-util-visit":65}],6:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],6:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -864,7 +866,7 @@ function checkboxContentIndent(ast, file, preferred, done) { module.exports = checkboxContentIndent; -},{"mdast-util-position":63,"unist-util-visit":65}],7:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],7:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -999,7 +1001,7 @@ function codeBlockStyle(ast, file, preferred, done) { module.exports = codeBlockStyle; -},{"mdast-util-position":63,"unist-util-visit":65}],8:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],8:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1075,7 +1077,7 @@ function definitionCase(ast, file, preferred, done) { module.exports = definitionCase; -},{"mdast-util-position":63,"unist-util-visit":65}],9:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],9:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1151,7 +1153,7 @@ function definitionSpacing(ast, file, preferred, done) { module.exports = definitionSpacing; -},{"mdast-util-position":63,"unist-util-visit":65}],10:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],10:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1237,7 +1239,7 @@ function emphasisMarker(ast, file, preferred, done) { module.exports = emphasisMarker; -},{"mdast-util-position":63,"unist-util-visit":65}],11:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],11:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1344,7 +1346,7 @@ function fencedCodeFlag(ast, file, preferred, done) { module.exports = fencedCodeFlag; -},{"mdast-util-position":63,"unist-util-visit":65}],12:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],12:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1460,7 +1462,7 @@ function fencedCodeMarker(ast, file, preferred, done) { module.exports = fencedCodeMarker; -},{"mdast-util-position":63,"unist-util-visit":65}],13:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],13:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1584,7 +1586,7 @@ function finalDefinition(ast, file, preferred, done) { module.exports = finalDefinition; -},{"mdast-util-position":63,"unist-util-visit":65}],15:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],15:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1678,7 +1680,7 @@ function firstHeadingLevel(ast, file, preferred, done) { module.exports = firstHeadingLevel; -},{"mdast-util-position":63,"unist-util-visit":65}],17:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],17:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1740,7 +1742,7 @@ function hardBreakSpaces(ast, file, preferred, done) { module.exports = hardBreakSpaces; -},{"mdast-util-position":63,"unist-util-visit":65}],18:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],18:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1805,7 +1807,7 @@ function headingIncrement(ast, file, preferred, done) { module.exports = headingIncrement; -},{"mdast-util-position":63,"unist-util-visit":65}],19:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],19:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -1905,7 +1907,7 @@ function headingStyle(ast, file, preferred, done) { module.exports = headingStyle; -},{"mdast-util-heading-style":62,"mdast-util-position":63,"unist-util-visit":65}],20:[function(require,module,exports){ +},{"mdast-util-heading-style":61,"mdast-util-position":62,"unist-util-visit":66}],20:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2117,7 +2119,7 @@ function linkTitleStyle(ast, file, preferred, done) { module.exports = linkTitleStyle; -},{"mdast-util-position":63,"unist-util-visit":65}],22:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],22:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2196,7 +2198,7 @@ function listItemBulletIndent(ast, file, preferred, done) { module.exports = listItemBulletIndent; -},{"mdast-util-position":63,"unist-util-visit":65,"plur":67}],23:[function(require,module,exports){ +},{"mdast-util-position":62,"plur":65,"unist-util-visit":66}],23:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2310,7 +2312,7 @@ function listItemContentIndent(ast, file, preferred, done) { module.exports = listItemContentIndent; -},{"mdast-util-position":63,"unist-util-visit":65,"plur":67}],24:[function(require,module,exports){ +},{"mdast-util-position":62,"plur":65,"unist-util-visit":66}],24:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2460,7 +2462,7 @@ function listItemIndent(ast, file, preferred, done) { module.exports = listItemIndent; -},{"mdast-util-position":63,"unist-util-visit":65,"plur":67}],25:[function(require,module,exports){ +},{"mdast-util-position":62,"plur":65,"unist-util-visit":66}],25:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2580,7 +2582,7 @@ function listItemSpacing(ast, file, preferred, done) { module.exports = listItemSpacing; -},{"mdast-util-position":63,"unist-util-visit":65}],26:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],26:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2641,7 +2643,7 @@ function maximumHeadingLength(ast, file, preferred, done) { module.exports = maximumHeadingLength; -},{"mdast-util-position":63,"mdast-util-to-string":64,"unist-util-visit":65}],27:[function(require,module,exports){ +},{"mdast-util-position":62,"mdast-util-to-string":63,"unist-util-visit":66}],27:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2828,7 +2830,7 @@ function maximumLineLength(ast, file, preferred, done) { module.exports = maximumLineLength; -},{"mdast-util-position":63,"unist-util-visit":65}],28:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],28:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -2914,7 +2916,7 @@ function noAutoLinkWithoutProtocol(ast, file, preferred, done) { module.exports = noAutoLinkWithoutProtocol; -},{"mdast-util-position":63,"mdast-util-to-string":64,"unist-util-visit":65}],29:[function(require,module,exports){ +},{"mdast-util-position":62,"mdast-util-to-string":63,"unist-util-visit":66}],29:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3000,7 +3002,7 @@ function noBlockquoteWithoutCaret(ast, file, preferred, done) { module.exports = noBlockquoteWithoutCaret; -},{"mdast-util-position":63,"unist-util-visit":65}],30:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],30:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3130,7 +3132,7 @@ function noConsecutiveBlankLines(ast, file, preferred, done) { module.exports = noConsecutiveBlankLines; -},{"mdast-util-position":63,"unist-util-visit":65,"plur":67}],31:[function(require,module,exports){ +},{"mdast-util-position":62,"plur":65,"unist-util-visit":66}],31:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3207,7 +3209,7 @@ function noDuplicateDefinitions(ast, file, preferred, done) { module.exports = noDuplicateDefinitions; -},{"mdast-util-position":63,"unist-util-visit":65}],32:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],32:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3282,7 +3284,7 @@ function noDuplicateHeadings(ast, file, preferred, done) { module.exports = noDuplicateHeadings; -},{"mdast-util-position":63,"mdast-util-to-string":64,"unist-util-visit":65}],33:[function(require,module,exports){ +},{"mdast-util-position":62,"mdast-util-to-string":63,"unist-util-visit":66}],33:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3365,7 +3367,7 @@ function noEmphasisAsHeading(ast, file, preferred, done) { module.exports = noEmphasisAsHeading; -},{"mdast-util-position":63,"mdast-util-to-string":64,"unist-util-visit":65}],34:[function(require,module,exports){ +},{"mdast-util-position":62,"mdast-util-to-string":63,"unist-util-visit":66}],34:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3676,7 +3678,7 @@ function noHeadingContentIndent(ast, file, preferred, done) { module.exports = noHeadingContentIndent; -},{"mdast-util-heading-style":62,"mdast-util-position":63,"unist-util-visit":65,"plur":67}],40:[function(require,module,exports){ +},{"mdast-util-heading-style":61,"mdast-util-position":62,"plur":65,"unist-util-visit":66}],40:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3779,7 +3781,7 @@ function noHeadingIndent(ast, file, preferred, done) { module.exports = noHeadingIndent; -},{"mdast-util-position":63,"unist-util-visit":65,"plur":67}],41:[function(require,module,exports){ +},{"mdast-util-position":62,"plur":65,"unist-util-visit":66}],41:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3852,7 +3854,7 @@ function noHeadingPunctuation(ast, file, preferred, done) { module.exports = noHeadingPunctuation; -},{"mdast-util-position":63,"mdast-util-to-string":64,"unist-util-visit":65}],42:[function(require,module,exports){ +},{"mdast-util-position":62,"mdast-util-to-string":63,"unist-util-visit":66}],42:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3899,7 +3901,7 @@ function html(ast, file, preferred, done) { module.exports = html; -},{"mdast-util-position":63,"unist-util-visit":65}],43:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],43:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -3969,7 +3971,7 @@ function noInlinePadding(ast, file, preferred, done) { module.exports = noInlinePadding; -},{"mdast-util-position":63,"mdast-util-to-string":64,"unist-util-visit":65}],44:[function(require,module,exports){ +},{"mdast-util-position":62,"mdast-util-to-string":63,"unist-util-visit":66}],44:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4033,7 +4035,7 @@ function noLiteralURLs(ast, file, preferred, done) { module.exports = noLiteralURLs; -},{"mdast-util-position":63,"unist-util-visit":65}],45:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],45:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4116,7 +4118,7 @@ function noMissingBlankLines(ast, file, preferred, done) { module.exports = noMissingBlankLines; -},{"mdast-util-position":63,"unist-util-visit":65}],46:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],46:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4178,7 +4180,7 @@ function noMultipleToplevelHeadings(ast, file, preferred, done) { module.exports = noMultipleToplevelHeadings; -},{"mdast-util-position":63,"unist-util-visit":65}],47:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],47:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4280,7 +4282,7 @@ function noShellDollars(ast, file, preferred, done) { module.exports = noShellDollars; -},{"mdast-util-position":63,"unist-util-visit":65}],48:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],48:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4336,7 +4338,7 @@ function noShortcutReferenceImage(ast, file, preferred, done) { module.exports = noShortcutReferenceImage; -},{"mdast-util-position":63,"unist-util-visit":65}],49:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],49:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4392,7 +4394,7 @@ function noShortcutReferenceLink(ast, file, preferred, done) { module.exports = noShortcutReferenceLink; -},{"mdast-util-position":63,"unist-util-visit":65}],50:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],50:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4454,7 +4456,7 @@ function noTableIndentation(ast, file, preferred, done) { module.exports = noTableIndentation; -},{"mdast-util-position":63,"unist-util-visit":65}],51:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],51:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4622,7 +4624,7 @@ function orderedListMarkerStyle(ast, file, preferred, done) { module.exports = orderedListMarkerStyle; -},{"mdast-util-position":63,"unist-util-visit":65}],53:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],53:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4780,7 +4782,7 @@ function orderedListMarkerValue(ast, file, preferred, done) { module.exports = orderedListMarkerValue; -},{"mdast-util-position":63,"unist-util-visit":65}],54:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],54:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4879,7 +4881,7 @@ function ruleStyle(ast, file, preferred, done) { module.exports = ruleStyle; -},{"mdast-util-position":63,"unist-util-visit":65}],55:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],55:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -4963,7 +4965,7 @@ function strongMarker(ast, file, preferred, done) { module.exports = strongMarker; -},{"mdast-util-position":63,"unist-util-visit":65}],56:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],56:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -5141,7 +5143,7 @@ function tableCellPadding(ast, file, preferred, done) { module.exports = tableCellPadding; -},{"mdast-util-position":63,"unist-util-visit":65}],57:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],57:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -5243,7 +5245,7 @@ function tablePipeAlignment(ast, file, preferred, done) { module.exports = tablePipeAlignment; -},{"mdast-util-position":63,"unist-util-visit":65}],58:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],58:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -5320,7 +5322,7 @@ function tablePipes(ast, file, preferred, done) { module.exports = tablePipes; -},{"mdast-util-position":63,"unist-util-visit":65}],59:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],59:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. @@ -5443,56 +5445,17 @@ function unorderedListMarkerStyle(ast, file, preferred, done) { module.exports = unorderedListMarkerStyle; -},{"mdast-util-position":63,"unist-util-visit":65}],60:[function(require,module,exports){ +},{"mdast-util-position":62,"unist-util-visit":66}],60:[function(require,module,exports){ /** * @author Titus Wormer - * @copyright 2015 Titus Wormer. All rights reserved. - * @module mdast-message-sort - * @fileoverview mdast plug-in to sort messages by line/column. + * @copyright 2015 Titus Wormer + * @license MIT + * @module mdast:range + * @fileoverview Patch index-based range on mdast nodes. */ 'use strict'; -/** - * Sort all `file`s messages by line/column. - * - * @private - * @param {Node} ast - Root node. - * @param {File} file - Virtual file. - */ -function transformer(ast, file) { - file.messages.sort(function (a, b) { - return a.line === undefined || a.line === null ? - -1 : - b.line === undefined || b.line === null ? - 1 : - a.line - b.line || a.column - b.column; - }); -} - -/** - * Return `transformer`. - * - * @example - * mdast.use(attacher).process(doc, function (err, res, file) { - * console.log(file.messages) - * }); - * - * @return {Function} - See `transformer`. - */ -function attacher() { - return transformer; -} - -/* - * Expose. - */ - -module.exports = attacher; - -},{}],61:[function(require,module,exports){ -'use strict'; - /* * Dependencies. */ @@ -5502,7 +5465,7 @@ var visit = require('unist-util-visit'); /** * Calculate offsets for `lines`. * - * @param {Array.} lines + * @param {Array.} lines - Lines to compile. * @return {Array.} */ function toOffsets(lines) { @@ -5521,7 +5484,7 @@ function toOffsets(lines) { /** * Add an offset based on `offsets` to `position`. * - * @param {Object} position + * @param {Object} position - Position. */ function addRange(position, fn) { position.offset = fn(position); @@ -5597,10 +5560,10 @@ function offsetToPositionFactory(offsets) { } /** - * Add ranges for `doc` to `ast`. + * Add ranges for `ast`. * - * @param {Node} ast - * @param {File} file + * @param {Node} ast - Context to patch. + * @param {VFile} file - Virtual file. */ function transformer(ast, file) { var contents = String(file).split('\n'); @@ -5660,12 +5623,12 @@ function attacher() { module.exports = attacher; -},{"unist-util-visit":65}],62:[function(require,module,exports){ +},{"unist-util-visit":66}],61:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. - * @module mdast-util-heading-style - * @fileoverview Utility to get the style of a heading. + * @module mdast:util:heading-style + * @fileoverview Utility to get the style of an mdast heading. */ 'use strict'; @@ -5750,11 +5713,11 @@ function style(node, relative) { module.exports = style; -},{}],63:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. - * @module mdast-util-position + * @module mdast:util:position * @fileoverview Utility to get either the starting or the * ending position of a node, and if its generated or not. */ @@ -5854,11 +5817,11 @@ position.generated = generated; module.exports = position; -},{}],64:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ /** * @author Titus Wormer * @copyright 2015 Titus Wormer. All rights reserved. - * @module mdast-util-to-string + * @module mdast:util:to-string * @fileoverview Utility to get the text value of a node. */ @@ -5897,122 +5860,7 @@ function toString(node) { module.exports = toString; -},{}],65:[function(require,module,exports){ -/** - * @author Titus Wormer - * @copyright 2015 Titus Wormer. All rights reserved. - * @module unist-util-visit - * @fileoverview Utility to recursively walk over mdast nodes. - */ - -'use strict'; - -/** - * Walk forwards. - * - * @param {Array.<*>} values - Things to iterate over, - * forwards. - * @param {function(*, number): boolean} callback - Function - * to invoke. - * @return {boolean} - False if iteration stopped. - */ -function forwards(values, callback) { - var index = -1; - var length = values.length; - - while (++index < length) { - if (callback(values[index], index) === false) { - return false; - } - } - - return true; -} - -/** - * Walk backwards. - * - * @param {Array.<*>} values - Things to iterate over, - * backwards. - * @param {function(*, number): boolean} callback - Function - * to invoke. - * @return {boolean} - False if iteration stopped. - */ -function backwards(values, callback) { - var index = values.length; - var length = -1; - - while (--index > length) { - if (callback(values[index], index) === false) { - return false; - } - } - - return true; -} - -/** - * Visit. - * - * @param {Node} tree - Root node - * @param {string} [type] - Node type. - * @param {function(node): boolean?} callback - Invoked - * with each found node. Can return `false` to stop. - * @param {boolean} [reverse] - By default, `visit` will - * walk forwards, when `reverse` is `true`, `visit` - * walks backwards. - */ -function visit(tree, type, callback, reverse) { - var iterate; - var one; - var all; - - if (typeof type === 'function') { - reverse = callback; - callback = type; - type = null; - } - - iterate = reverse ? backwards : forwards; - - /** - * Visit `children` in `parent`. - */ - all = function (children, parent) { - return iterate(children, function (child, index) { - return child && one(child, index, parent); - }); - }; - - /** - * Visit a single node. - */ - one = function (node, index, parent) { - var result; - - index = index || (parent ? 0 : null); - - if (!type || node.type === type) { - result = callback(node, index, parent || null); - } - - if (node.children && result !== false) { - return all(node.children, node); - } - - return result; - }; - - one(tree); -} - -/* - * Expose. - */ - -module.exports = visit; - -},{}],66:[function(require,module,exports){ +},{}],64:[function(require,module,exports){ 'use strict'; /* @@ -6075,7 +5923,7 @@ var PARAMETERS = new RegExp( /** * Create an expression which matches a marker. * - * @param {string} name + * @param {string} name - Plug-in name. * @return {RegExp} */ function marker(name) { @@ -6107,7 +5955,7 @@ function marker(name) { /** * Parse `value` into an object. * - * @param {string} value + * @param {string} value - HTML comment. * @return {Object} */ function parameters(value) { @@ -6135,8 +5983,9 @@ function parameters(value) { /** * Factory to test if `node` matches `settings`. * - * @param {Object} settings - * @param {function(Object)} callback + * @param {Object} settings - Configuration. + * @param {Function} callback - Invoked iwht a matching + * HTML node. * @return {Function} */ function testFactory(settings, callback) { @@ -6146,8 +5995,8 @@ function testFactory(settings, callback) { /** * Test if `node` matches the bound settings. * - * @param {Node} node - * @param {Parser|Compiler} [context] + * @param {MDASTNode} node - Node to check. + * @param {Parser|Compiler} [context] - Context class. * @return {Object?} */ function test(node, context) { @@ -6190,7 +6039,7 @@ function testFactory(settings, callback) { * Parse factory. * * @param {Function} tokenize - Previous parser. - * @param {Object} settings + * @param {Object} settings - Configuration. */ function parse(tokenize, settings) { var callback = settings.onparse; @@ -6218,7 +6067,7 @@ function parse(tokenize, settings) { * Stringify factory. * * @param {Function} compile - Previous compiler. - * @param {Object} settings + * @param {Object} settings - Configuration. */ function stringify(compile, settings) { var callback = settings.onstringify; @@ -6231,7 +6080,7 @@ function stringify(compile, settings) { /** * Stringify HTML. * - * @param {Object} node + * @param {MDASTHTMLNode} node - HTML node. * @return {string} */ return function (node) { @@ -6244,7 +6093,7 @@ function stringify(compile, settings) { /** * Run factory. * - * @param {Object} settings + * @param {Object} settings - Configuration. */ function run(settings) { var callback = settings.onrun; @@ -6260,9 +6109,10 @@ function run(settings) { * * Passed intto `visit`. * - * @param {Node} node - * @param {number} index - * @param {Node} parent + * @param {MDASTNode} node - node to check. + * @param {number} index - Position of `node` in + * `parent`. + * @param {MDASTNode} parent - Parent of `node`. */ function gather(node, index, parent) { var result = test(node); @@ -6310,7 +6160,7 @@ function run(settings) { /** * Modify AST. * - * @param {Object} node + * @param {MDASTNode} node - Root node. */ return function (node) { visit(node, gather); @@ -6321,8 +6171,8 @@ function run(settings) { * Modify mdast to invoke callbacks when HTML commnts are * found. * - * @param {MDAST} mdast - * @param {Object?} options + * @param {MDAST} mdast - Instance. + * @param {Object?} [options] - Configuration. * @return {Function?} */ function attacher(mdast, options) { @@ -6352,7 +6202,7 @@ function attacher(mdast, options) { * Reason for this is that **mdast** only allows a single * function to be `use`d once. * - * @param {Object} options + * @param {Object} options - Plugin configuration. * @return {Function} */ function wrapper(options) { @@ -6371,7 +6221,7 @@ function wrapper(options) { module.exports = wrapper; -},{"unist-util-visit":65}],67:[function(require,module,exports){ +},{"unist-util-visit":66}],65:[function(require,module,exports){ 'use strict'; module.exports = function (str, plural, count) { if (typeof plural === 'number') { @@ -6387,5 +6237,171 @@ module.exports = function (str, plural, count) { return count === 1 ? str : plural; }; +},{}],66:[function(require,module,exports){ +/** + * @author Titus Wormer + * @copyright 2015 Titus Wormer. All rights reserved. + * @module unist:util:visit + * @fileoverview Utility to recursively walk over unist nodes. + */ + +'use strict'; + +/** + * Walk forwards. + * + * @param {Array.<*>} values - Things to iterate over, + * forwards. + * @param {function(*, number): boolean} callback - Function + * to invoke. + * @return {boolean} - False if iteration stopped. + */ +function forwards(values, callback) { + var index = -1; + var length = values.length; + + while (++index < length) { + if (callback(values[index], index) === false) { + return false; + } + } + + return true; +} + +/** + * Walk backwards. + * + * @param {Array.<*>} values - Things to iterate over, + * backwards. + * @param {function(*, number): boolean} callback - Function + * to invoke. + * @return {boolean} - False if iteration stopped. + */ +function backwards(values, callback) { + var index = values.length; + var length = -1; + + while (--index > length) { + if (callback(values[index], index) === false) { + return false; + } + } + + return true; +} + +/** + * Visit. + * + * @param {Node} tree - Root node + * @param {string} [type] - Node type. + * @param {function(node): boolean?} callback - Invoked + * with each found node. Can return `false` to stop. + * @param {boolean} [reverse] - By default, `visit` will + * walk forwards, when `reverse` is `true`, `visit` + * walks backwards. + */ +function visit(tree, type, callback, reverse) { + var iterate; + var one; + var all; + + if (typeof type === 'function') { + reverse = callback; + callback = type; + type = null; + } + + iterate = reverse ? backwards : forwards; + + /** + * Visit `children` in `parent`. + */ + all = function (children, parent) { + return iterate(children, function (child, index) { + return child && one(child, index, parent); + }); + }; + + /** + * Visit a single node. + */ + one = function (node, index, parent) { + var result; + + index = index || (parent ? 0 : null); + + if (!type || node.type === type) { + result = callback(node, index, parent || null); + } + + if (node.children && result !== false) { + return all(node.children, node); + } + + return result; + }; + + one(tree); +} + +/* + * Expose. + */ + +module.exports = visit; + +},{}],67:[function(require,module,exports){ +/** + * @author Titus Wormer + * @copyright 2015 Titus Wormer + * @license MIT + * @module vfile:sort + * @fileoverview Sort VFile messages by line/column. + */ + +'use strict'; + +/** + * Compare a single property. + * + * @param {VFileMessage} a - Original. + * @param {VFileMessage} b - Comparison. + * @param {string} property - Property to compare. + * @return {number} + */ +function check(a, b, property) { + return (a[property] || 0) - (b[property] || 0); +} + +/** + * Comparator. + * + * @param {VFileMessage} a - Original. + * @param {VFileMessage} b - Comparison. + * @return {number} + */ +function comparator(a, b) { + return check(a, b, 'line') || check(a, b, 'column') || -1; +} + +/** + * Sort all `file`s messages by line/column. + * + * @param {VFile} file - Virtual file. + * @return {VFile} - `file`. + */ +function sort(file) { + file.messages.sort(comparator); + return file; +} + +/* + * Expose. + */ + +module.exports = sort; + },{}]},{},[1])(1) }); \ No newline at end of file diff --git a/mdast-lint.min.js b/mdast-lint.min.js index 05e4edb0..917e0fa3 100644 --- a/mdast-lint.min.js +++ b/mdast-lint.min.js @@ -1 +1 @@ -!function(b,a){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define([],b):(typeof window!=='undefined'?a=window:typeof global!=='undefined'?a=global:typeof self!=='undefined'?a=self:a=this,a.mdastLint=b())}(function(){return function a(b,c,e){function f(d,k){if(!c[d]){if(!b[d]){var i=typeof require=='function'&&require;if(!k&&i)return i(d,!0);if(g)return g(d,!0);var j=new Error("Cannot find module '"+d+"'");throw j.code='MODULE_NOT_FOUND',j}var h=c[d]={exports:{}};b[d][0].call(h.exports,function(c){var a=b[d][1][c];return f(a?a:c)},h,h.exports,a,b,c,e)}return c[d].exports}var g=typeof require=='function'&&require;for(var d=0;da)return;g&&(d.push({start:e,end:a}),g=!1),e=a}var i=h.children[h.children.length-1],d=[],e=0,g=!1;if(!(b&&b.messages&&b.messages.length))return;c(h,function(b){var c=a.start(b),d=a.end(b);f(c&&c.offset),b.children||f(d&&d.offset)}),e===a.end(i).offset&&(f(),f(b.toString().length-1)),b.messages=b.messages.filter(function(a){var e=b.lintRanges[a.ruleId],g=e&&e.length,f=d.length,i=-1,h,c;a.line||(a.line=1),a.column||(a.column=1),h=b.positionToOffset(a);while(f--)if(d[f].start<=h&&d[f].end>h)return!1;while(--g>i)if(c=e[g],c.position.line0?'Add':'Remove',d=Math.abs(d),d!==0&&g.warn(i+' '+d+' '+f('space',d)+' between blockquote and content',a.start(e.children[0]))):b=c(e)}),h()}var d=b('unist-util-visit'),e=b('mdast-util-to-string'),f=b('plur'),a=b('mdast-util-position');g.exports=h},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':65,plur:67}],5:[function(f,i,j){'use strict';function h(j,h,f,k){var i=h.toString();(f==='consistent'||typeof f!=='object')&&(f={}),f.unchecked||(f.unchecked=null),f.checked||(f.checked=null),f.unchecked!==null&&e[f.unchecked]!==!0&&h.fail('Invalid unchecked checkbox marker `'+f.unchecked+"`: use either `'\\t'`, or `' '`"),f.checked!==null&&g[f.checked]!==!0&&h.fail('Invalid checked checkbox marker `'+f.checked+"`: use either `'x'`, or `'X'`"),c(j,'listItem',function(c){var e,k,n,l,g,j,m;if(c.checked!==Boolean(c.checked)||a.generated(c))return;e=c.checked?'checked':'unchecked',k=b(c).offset,n=(c.children.length?b(c.children[0]):d(c)).offset,g=i.slice(k,n).trimRight().slice(0,-1),m=g.charAt(g.length-1),j=f[e],j===null?f[e]=m:m!==j&&(l=k+g.length,h.warn(e.charAt(0).toUpperCase()+e.slice(1)+' checkboxes should use `'+j+'` as a marker',{start:h.offsetToPosition(l-1),end:h.offsetToPosition(l)}))}),k()}var c=f('unist-util-visit'),a=f('mdast-util-position'),b=a.start,d=a.end,g={x:!0,X:!0},e={' ':!0,' ':!0};i.exports=h},{'mdast-util-position':63,'unist-util-visit':65}],6:[function(c,f,h){'use strict';function g(g,c,i,h){var f=c.toString();d(g,'listItem',function(d){var i,g,h;if(d.checked!==Boolean(d.checked)||a.generated(d))return;i=b(d).offset,g=(d.children.length?b(d.children[0]):e(d)).offset;while(/[^\S\n]/.test(f.charAt(g)))g++;if(h=f.slice(i,g),h=h.slice(h.indexOf(']')+1),h.length===1)return;c.warn('Checkboxes should be followed by a single character',{start:c.offsetToPosition(g-h.length+1),end:c.offsetToPosition(g)})}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b=a.start,e=a.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':65}],7:[function(b,g,i){'use strict';function h(i,g,b,j){function k(b){var c=d(b).offset,f=e(b).offset;return a.generated(b)?null:b.lang||/^\s*([~`])\1{2,}/.test(h.slice(c,f))?'fenced':'indented'}var h=g.toString();if(b=typeof b!=='string'||b==='consistent'?null:b,f[b]!==!0){g.fail('Invalid code block style `'+b+"`: use either `'consistent'`, `'fenced'`, or `'indented'`");return}c(i,'code',function(c){var a=k(c);if(!a)return;b?b!==a&&g.warn('Code blocks should be '+b,c):b=a}),j()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end,f={null:!0,fenced:!0,indented:!0};g.exports=h},{'mdast-util-position':63,'unist-util-visit':65}],8:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var f=a.start(b).offset,h=a.end(b).offset,c;if(a.generated(b))return;c=g.slice(f,h).match(d)[1],c!==c.toLowerCase()&&e.warn('Do not use upper-case characters in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':63,'unist-util-visit':65}],9:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var c=a.start(b).offset,f=a.end(b).offset,h;if(a.generated(b))return;h=g.slice(c,f).match(d)[1],/[ \t\n]{2,}/.test(h)&&e.warn('Do not use consecutive white-space in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':63,'unist-util-visit':65}],10:[function(b,e,g){'use strict';function f(f,e,b,g){if(b=typeof b!=='string'||b==='consistent'?null:b,d[b]!==!0){e.fail('Invalid emphasis marker `'+b+"`: use either `'consistent'`, `'*'`, or `'_'`");return}c(f,'emphasis',function(c){var d=e.toString().charAt(a.start(c).offset);if(a.generated(c))return;b?d!==b&&e.warn('Emphasis should use `'+b+'` as a marker',c):b=d}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d={'*':!0,_:!0,null:!0};e.exports=f},{'mdast-util-position':63,'unist-util-visit':65}],11:[function(b,f,h){'use strict';function g(j,g,b,k){var i=g.toString(),h=!1,f=[];typeof b==='object'&&!('length'in b)&&(h=Boolean(b.allowEmpty),b=b.flags),typeof b==='object'&&'length'in b&&(f=String(b).split(',')),c(j,'code',function(b){var c=i.slice(d(b).offset,e(b).offset);if(a.generated(b))return;b.lang?f.length&&f.indexOf(b.lang)===-1&&g.warn('Invalid code-language flag',b):/^\ {0,3}([~`])\1{2,}/.test(c)&&!h&&g.warn('Missing code-language flag',b)}),k()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':65}],12:[function(c,e,g){'use strict';function f(g,e,c,h){var f=e.toString();if(c=typeof c!=='string'||c==='consistent'?null:c,b[c]!==!0){e.fail('Invalid fenced code marker `'+c+"`: use either `'consistent'`, `` '`' ``, or `'~'`");return}d(g,'code',function(g){var d=f.substr(a.start(g).offset,4);if(a.generated(g))return;if(d=d.trimLeft().charAt(0),b[d]!==!0)return;c?d!==c&&e.warn('Fenced code should use '+c+' as a marker',g):c=d}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b={'`':!0,'~':!0,null:!0};e.exports=f},{'mdast-util-position':63,'unist-util-visit':65}],13:[function(c,a,d){'use strict';function b(e,c,a,d){var b=c.extension;a=typeof a==='string'?a:'md',b!==''&&b!==a&&c.warn('Invalid extension: use `'+a+'`'),d()}a.exports=b},{}],14:[function(b,e,g){'use strict';function f(e,f,h,g){var b=null;c(e,function(c){var e=d(c).line;if(c.type==='root'||a.generated(c))return;c.type==='definition'?b!==null&&b>e&&f.warn('Move definitions to the end of the file (after the node at line `'+b+'`)',c):b===null&&(b=e)},!0),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start;e.exports=f},{'mdast-util-position':63,'unist-util-visit':65}],15:[function(c,a,d){'use strict';function b(e,c,f,d){var a=c.toString(),b=a.length-1;b>0&&a.charAt(b)!=='\n'&&c.warn('Missing newline character at end of file'),d()}a.exports=b},{}],16:[function(a,d,f){'use strict';function e(a,d,f,e){b(a,'heading',function(a){return c.generated(a)?null:(a.depth!==1&&d.warn('First heading level should be `1`',a),!1)}),e()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':65}],17:[function(b,d,f){'use strict';function e(e,b,g,f){var d=b.toString();c(e,'break',function(c){var e=a.start(c).offset,f=a.end(c).offset;if(a.generated(c))return;d.slice(e,f).length>3&&b.warn('Use two spaces for hard line breaks',c)}),f()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':65}],18:[function(a,d,f){'use strict';function e(d,e,g,f){var a=null;b(d,'heading',function(b){var d=b.depth;if(c.generated(b))return;a&&d>a+1&&e.warn('Heading levels should increment by one level at a time',b),a=d}),f()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':65}],19:[function(a,f,h){'use strict';function g(f,g,a,h){a=e.indexOf(a)===-1?null:a,c(f,'heading',function(c){if(d.generated(c))return;a?b(c,a)!==a&&g.warn('Headings should use '+a,c):a=b(c,a)}),h()}var c=a('unist-util-visit'),b=a('mdast-util-heading-style'),d=a('mdast-util-position'),e=['atx','atx-closed','setext'];f.exports=g},{'mdast-util-heading-style':62,'mdast-util-position':63,'unist-util-visit':65}],20:[function(a,b,c){'use strict';b.exports={'no-auto-link-without-protocol':a('./no-auto-link-without-protocol'),'no-literal-urls':a('./no-literal-urls'),'no-consecutive-blank-lines':a('./no-consecutive-blank-lines'),'no-missing-blank-lines':a('./no-missing-blank-lines'),'blockquote-indentation':a('./blockquote-indentation'),'no-blockquote-without-caret':a('./no-blockquote-without-caret'),'code-block-style':a('./code-block-style'),'checkbox-content-indent':a('./checkbox-content-indent'),'checkbox-character-style':a('./checkbox-character-style'),'definition-case':a('./definition-case'),'definition-spacing':a('./definition-spacing'),'no-emphasis-as-heading':a('./no-emphasis-as-heading'),'emphasis-marker':a('./emphasis-marker'),'fenced-code-flag':a('./fenced-code-flag'),'fenced-code-marker':a('./fenced-code-marker'),'file-extension':a('./file-extension'),'final-newline':a('./final-newline'),'no-file-name-articles':a('./no-file-name-articles'),'no-file-name-consecutive-dashes':a('./no-file-name-consecutive-dashes'),'no-file-name-irregular-characters':a('./no-file-name-irregular-characters'),'no-file-name-mixed-case':a('./no-file-name-mixed-case'),'no-file-name-outer-dashes':a('./no-file-name-outer-dashes'),'final-definition':a('./final-definition'),'hard-break-spaces':a('./hard-break-spaces'),'heading-increment':a('./heading-increment'),'no-heading-content-indent':a('./no-heading-content-indent'),'no-heading-indent':a('./no-heading-indent'),'first-heading-level':a('./first-heading-level'),'maximum-heading-length':a('./maximum-heading-length'),'no-heading-punctuation':a('./no-heading-punctuation'),'heading-style':a('./heading-style'),'no-multiple-toplevel-headings':a('./no-multiple-toplevel-headings'),'no-duplicate-headings':a('./no-duplicate-headings'),'no-duplicate-definitions':a('./no-duplicate-definitions'),'no-html':a('./no-html'),'no-inline-padding':a('./no-inline-padding'),'maximum-line-length':a('./maximum-line-length'),'link-title-style':a('./link-title-style'),'list-item-bullet-indent':a('./list-item-bullet-indent'),'list-item-content-indent':a('./list-item-content-indent'),'list-item-indent':a('./list-item-indent'),'list-item-spacing':a('./list-item-spacing'),'ordered-list-marker-style':a('./ordered-list-marker-style'),'ordered-list-marker-value':a('./ordered-list-marker-value'),'no-shortcut-reference-image':a('./no-shortcut-reference-image'),'no-shortcut-reference-link':a('./no-shortcut-reference-link'),'rule-style':a('./rule-style'),'no-shell-dollars':a('./no-shell-dollars'),'strong-marker':a('./strong-marker'),'no-table-indentation':a('./no-table-indentation'),'table-pipe-alignment':a('./table-pipe-alignment'),'table-cell-padding':a('./table-cell-padding'),'table-pipes':a('./table-pipes'),'no-tabs':a('./no-tabs'),'unordered-list-marker-style':a('./unordered-list-marker-style')}},{'./blockquote-indentation':4,'./checkbox-character-style':5,'./checkbox-content-indent':6,'./code-block-style':7,'./definition-case':8,'./definition-spacing':9,'./emphasis-marker':10,'./fenced-code-flag':11,'./fenced-code-marker':12,'./file-extension':13,'./final-definition':14,'./final-newline':15,'./first-heading-level':16,'./hard-break-spaces':17,'./heading-increment':18,'./heading-style':19,'./link-title-style':21,'./list-item-bullet-indent':22,'./list-item-content-indent':23,'./list-item-indent':24,'./list-item-spacing':25,'./maximum-heading-length':26,'./maximum-line-length':27,'./no-auto-link-without-protocol':28,'./no-blockquote-without-caret':29,'./no-consecutive-blank-lines':30,'./no-duplicate-definitions':31,'./no-duplicate-headings':32,'./no-emphasis-as-heading':33,'./no-file-name-articles':34,'./no-file-name-consecutive-dashes':35,'./no-file-name-irregular-characters':36,'./no-file-name-mixed-case':37,'./no-file-name-outer-dashes':38,'./no-heading-content-indent':39,'./no-heading-indent':40,'./no-heading-punctuation':41,'./no-html':42,'./no-inline-padding':43,'./no-literal-urls':44,'./no-missing-blank-lines':45,'./no-multiple-toplevel-headings':46,'./no-shell-dollars':47,'./no-shortcut-reference-image':48,'./no-shortcut-reference-link':49,'./no-table-indentation':50,'./no-tabs':51,'./ordered-list-marker-style':52,'./ordered-list-marker-value':53,'./rule-style':54,'./strong-marker':55,'./table-cell-padding':56,'./table-pipe-alignment':57,'./table-pipes':58,'./unordered-list-marker-style':59}],21:[function(d,f,h){'use strict';function g(g,f,d,j){function h(h){var a=e(h).offset-1,g,j;if(b.generated(h))return;h.type!=='definition'&&a--;while(a){if(g=i.charAt(a),!/\s/.test(g))break;a--}if(!(g in c))return;d?d!==g&&(j=f.offsetToPosition(a+1),f.warn(d===')'?'Titles should use `()` as a quote':'Titles should use `'+d+'` as a quote',j)):d=g}var i=f.toString();if(d=typeof d!=='string'||d==='consistent'?null:d,(d==='()'||d==='(')&&(d=')'),c[d]!==!0){f.fail('Invalid link title style marker `'+d+"`: use either `'consistent'`, `'\"'`, `'\\''`, or `'()'`");return}a(g,'link',h),a(g,'image',h),a(g,'definition',h),j()}var a=d('unist-util-visit'),b=d('mdast-util-position'),c={'"':!0,"'":!0,')':!0,null:!0},e=b.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':65}],22:[function(b,f,h){'use strict';function g(g,b,i,h){var f=b.toString();d(g,'list',function(d){var g=d.children;g.forEach(function(j){var i=j.children[0],g=a(j).offset,k=a(i).offset,h;if(c.generated(d))return;h=f.slice(g,k).match(/^\s*/)[0].length,h!==0&&(g=a(i),b.warn('Incorrect indentation before bullet: remove '+h+' '+e('space',h),{line:g.line,column:g.column-h}))})}),h()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start;f.exports=g},{'mdast-util-position':63,'unist-util-visit':65,plur:67}],23:[function(a,f,h){'use strict';function g(g,a,i,h){var f=a.toString();d(g,'listItem',function(d){var g;d.children.forEach(function(l,n){var j=c(l),h=j.column,k,i,m;if(b.generated(l))return;if(n===0){if(Boolean(d.checked)===d.checked){k=j.offset;while(f.charAt(k)!=='[')k--;h-=j.offset-k}g=h;return}h!==g&&(i=g-h,m=i>0?'add':'remove',i=Math.abs(i),a.warn('Don’t use mixed indentation for children, '+m+' '+i+' '+e('space',i),{line:c(l).line,column:h}))})}),h()}var d=a('unist-util-visit'),b=a('mdast-util-position'),e=a('plur'),c=b.start;f.exports=g},{'mdast-util-position':63,'unist-util-visit':65,plur:67}],24:[function(b,g,i){'use strict';function h(i,g,b,j){var h=g.toString();if(b=typeof b!=='string'?'tab-size':b,f[b]!==!0){g.fail('Invalid list-item indent style `'+b+"`: use either `'tab-size'`, `'space'`, or `'mixed'`");return}d(i,'list',function(d){var f=d.children,i=d.ordered,j=d.start||1;if(c.generated(d))return;f.forEach(function(r,s){var m=r.children[0],l=i?String(j+s).length+1:1,n=Math.ceil(l/4)*4,o=a(r).offset,p=a(m).offset,f,k,c,q;f=h.slice(o,p),f=f.replace(/\[[x ]?\]\s*$/i,''),b==='tab-size'?k=n:b==='space'?k=l+1:k=d.loose?n:l+1,f.length!==k&&(c=k-f.length,q=c>0?'add':'remove',c=Math.abs(c),g.warn('Incorrect list-item indent: '+q+' '+c+' '+e('space',c),a(m)))})}),j()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start,f={'tab-size':!0,mixed:!0,space:!0};g.exports=h},{'mdast-util-position':63,'unist-util-visit':65,plur:67}],25:[function(d,f,h){'use strict';function g(d,f,h,g){e(d,'list',function(g){var d=g.children,e=!0,h=b(g).column,i;if(a.generated(g))return;d.forEach(function(h){var a=h.children,d=a[0],f=a[a.length-1],g=c(f).line-b(d).line>0;g&&(e=!1)}),i=e?'tight':'loose',d.forEach(function(g,k){var a=d[k+1],j=c(g).column>h;if(!a)return;j!==e&&f.warn('List item should be '+i+', isn’t',{start:c(g),end:b(a)})})}),g()}var e=d('unist-util-visit'),a=d('mdast-util-position'),b=a.start,c=a.end;f.exports=g},{'mdast-util-position':63,'unist-util-visit':65}],26:[function(a,e,g){'use strict';function f(e,f,a,g){a=isNaN(a)||typeof a!=='number'?60:a,b(e,'heading',function(b){if(d.generated(b))return;c(b).length>a&&f.warn('Use headings shorter than `'+a+'`',b)}),g()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':65}],27:[function(e,f,i){'use strict';function g(a){return a.type==='heading'||a.type==='table'||a.type==='code'||a.type==='definition'}function h(k,l,j,q){function p(a,b){a--;while(++ae||h.columne&&l.warn('Line must be at most '+e+' characters',{line:h+1,column:i+1});q()}var b=e('unist-util-visit'),a=e('mdast-util-position'),c=a.start,d=a.end;f.exports=h},{'mdast-util-position':63,'unist-util-visit':65}],28:[function(d,j,k){'use strict';function i(a){return g.test(f(a))}function h(d,f,h,g){e(d,'link',function(d){var e=c(d.children[0]).column,g=b(d.children[d.children.length-1]).column,h=c(d).column,j=b(d).column;if(a.generated(d))return;h===e-1&&j===g+1&&!i(d)&&f.warn('All automatic links must start with a protocol',d)}),g()}var e=d('unist-util-visit'),f=d('mdast-util-to-string'),a=d('mdast-util-position'),c=a.start,b=a.end,g=/^[a-z][a-z+.-]+:\/?/i;j.exports=h},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':65}],29:[function(b,d,f){'use strict';function e(f,b,h,g){var d=b.toString(),e=d.length;c(f,'blockquote',function(c){var g=a.start(c).line,f=c.position&&c.position.indent;if(a.generated(c)||!f||!f.length)return;f.forEach(function(h,i){var a,c=g+i+1,f=b.positionToOffset({line:c,column:h})-1;while(++f')return;if(a!==' '&&a!==' ')break}b.warn('Missing caret in blockquote',{line:c,column:h})})}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':65}],30:[function(b,f,h){'use strict';function g(f,g,i,h){function b(e,b,f){var a=b.line-e.line,c=a>0?'before':'after';a=Math.abs(a)-f,a>0&&g.warn('Remove '+a+' '+d('line',a)+' '+c+' node',b)}c(f,function(d){var c=d.children;if(a.generated(d))return;c&&c[0]&&(b(a.start(d),a.start(c[0]),0),c.forEach(function(f,h){var d=c[h-1],g=e;if(!d||a.generated(d)||a.generated(f))return;(d.type==='list'&&f.type==='list'||f.type==='code'&&d.type==='list'&&!f.lang)&&g++,b(a.end(d),a.start(f),g)}),b(a.end(d),a.end(c[c.length-1]),1))}),h()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=b('plur'),e=2;f.exports=g},{'mdast-util-position':63,'unist-util-visit':65,plur:67}],31:[function(c,d,f){'use strict';function e(d,f,h,g){function e(b){var d=c[b.identifier],e;if(a.generated(b))return;d&&d.type&&(e=a.start(d),f.warn('Do not use definitions with the same identifier ('+e.line+':'+e.column+')',b)),c[b.identifier]=b}var c={};b(d,'definition',e),b(d,'footnoteDefinition',e),g()}var a=c('mdast-util-position'),b=c('unist-util-visit');d.exports=e},{'mdast-util-position':63,'unist-util-visit':65}],32:[function(a,e,g){'use strict';function f(e,f,h,g){var a={};c(e,'heading',function(c){var g=d(c).toUpperCase(),e=a[g],h;if(b.generated(c))return;e&&e.type==='heading'&&(h=b.start(e),f.warn('Do not use headings with similar content ('+h.line+':'+h.column+')',c)),a[g]=c}),g()}var b=a('mdast-util-position'),c=a('unist-util-visit'),d=a('mdast-util-to-string');e.exports=f},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':65}],33:[function(a,e,g){'use strict';function f(a,e,g,f){b(a,'paragraph',function(b,j,k){var f=b.children,a=f[0],g=k.children[j-1],h=k.children[j+1],i;if(d.generated(b))return;(!g||g.type!=='heading')&&h&&h.type==='paragraph'&&f.length===1&&(a.type==='emphasis'||a.type==='strong')&&(i=c(a),i.charAt(i.length-1)===':'&&e.warn('Don’t use emphasis to introduce a section, use a heading',b))}),f()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':63,'mdast-util-to-string':64,'unist-util-visit':65}],34:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/^(the|an?)\b/i);b&&a.warn('Do not start file names with `'+b[0]+'`'),c()}a.exports=b},{}],35:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/-{2,}/.test(a.filename)&&a.warn('Do not use consecutive dashes in a file name'),b()}a.exports=b},{}],36:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/[^.a-zA-Z0-9-]/);b&&a.warn('Do not use `'+b[0]+'` in a file name'),c()}a.exports=b},{}],37:[function(c,a,d){'use strict';function b(d,b,e,c){var a=b.filename;a&&!(a===a.toLowerCase()||a===a.toUpperCase())&&b.warn('Do not mix casing in file names'),c()}a.exports=b},{}],38:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/^-|-$/.test(a.filename)&&a.warn('Do not use initial or final dashes in a file name'),b()}a.exports=b},{}],39:[function(c,i,j){'use strict';function h(i,c,k,j){var h=c.toString();f(i,'heading',function(i){var n=i.depth,k=i.children,l=g(i,'atx'),m,o,f,p,j;if(b.generated(i))return;if(l==='atx'||l==='atx-closed'){m=a(i),j=m.offset;while(h.charAt(j)!=='#')j++;j=n+(j-m.offset),f=a(k[0]).column-m.column-1-j,f&&(p=f>0?'Remove':'Add',f=Math.abs(f),c.warn(p+' '+f+' '+e('space',f)+' before this heading’s content',a(k[0])))}l==='atx-closed'&&(o=d(k[k.length-1]),f=d(i).column-o.column-1-n,f&&c.warn('Remove '+f+' '+e('space',f)+' after this heading’s content',o))}),j()}var f=c('unist-util-visit'),g=c('mdast-util-heading-style'),e=c('plur'),b=c('mdast-util-position'),a=b.start,d=b.end;i.exports=h},{'mdast-util-heading-style':62,'mdast-util-position':63,'unist-util-visit':65,plur:67}],40:[function(a,f,h){'use strict';function g(h,f,j,i){var a=f.toString(),g=a.length;c(h,'heading',function(l){var h=e(l),j=h.offset,i=j-1,k,c;if(b.generated(l))return;while(++i1&&b.warn('Do not indent table rows',c)})}),e()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':63,'unist-util-visit':65}],51:[function(c,a,d){'use strict';function b(f,b,g,e){var c=b.toString(),a=-1,d=c.length;while(++ac)return{line:b+1,column:c-(a[b-1]||0)+1};return{}}return b}function h(i,c){var e=String(c).split('\n'),h;if(!c||typeof c.contents!=='string')throw new Error('Missing `file` for mdast-range');e=d(e),h=f(e),c.offsetToPosition=g(e),c.positionToOffset=h,b(i,function(c){var b=c.position;b&&b.start&&a(b.start,h),b&&b.end&&a(b.end,h)})}function i(){return h}var b=e('unist-util-visit');c.exports=i},{'unist-util-visit':65}],62:[function(d,b,e){'use strict';function a(b,a){return b<3?'atx':a==='atx'||a==='setext'?a:null}function c(b,g){var c=b.children[b.children.length-1],d=b.depth,e=b&&b.position&&b.position.end,f=c&&c.position&&c.position.end;return e?c?f.line+1===e.line?'setext':f.column+dc)if(d(b[a],a)===!1)return!1;return!0}function d(i,a,d,f){var g,e,h;typeof a==='function'&&(f=d,d=a,a=null),g=f?c:b,h=function(a,b){return g(a,function(a,c){return a&&e(a,c,b)})},e=function(b,c,f){var e;return c=c||(f?0:null),(!a||b.type===a)&&(e=d(b,c,f||null)),b.children&&e!==!1?h(b.children,b):e},e(i)}a.exports=d},{}],66:[function(h,m,n){'use strict';function g(a){return new RegExp('(\\s*'+'\\s*'+')')}function f(b){var a={};return b.replace(e,function(g,c,d,e,f){var b=d||e||f||'';return b==='true'||b===''?b=!0:b==='false'?b=!1:isNaN(b)||(b=Number(b)),a[c]=b,''}),a}function a(a,b){function e(e,i){var g=e.value,c,h;return e.type!=='html'?null:(c=g.match(d),!c||c[1].length!==g.length||c[2]!==a.name?null:(h={type:c[3]||'marker',attributes:c[4]||'',parameters:f(c[4]||''),node:e},b&&b(h,i),h))}var c=a.name,d=g(c);return e}function b(e,b){var c=b.onparse,d=a(b,function(a,b){a.type==='marker'&&c(a,b)});return function(){var a=e.apply(this,arguments);return d(a,this),a}}function i(e,b){var c=b.onstringify,d=a(b,function(a,b){a.type==='marker'&&c(a,b)});return function(a){return d(a,this),e.apply(this,arguments)}}function j(i){function l(l,i,m){var a=k(l),d=a&&a.type;e&&m===e&&(d==='start'&&f++,d==='end'&&f--,d==='end'&&f===0?(b=j(g,b,a,{start:i-b.length-1,end:i,parent:e}),b&&c.apply(e.children,[h,i+1].concat(b)),g=null,e=null,h=null,b=[]):b.push(l)),!e&&d==='start'&&(f=1,h=i,g=a,e=m)}var j=i.onrun,k=a(i),b=[],g=null,e=null,f=0,h;return function(a){d(a,l)}}function k(c,a){var d=c.Parser.prototype.blockTokenizers,e=c.Parser.prototype.inlineTokenizers,f=c.Compiler.prototype;return a.onparse&&(d.html=b(d.html,a),e.tag=b(e.tag,a)),a.onstringify&&(f.html=i(f.html,a)),a.onrun?j(a):null}function l(a){if(!(a&&a.name))throw new Error('Missing `name` in `options`');return function(b){return k(b,a)}}var d=h('unist-util-visit'),c=[].splice,e=new RegExp('\\s*([-a-z09_]+)(?:=(?:"((?:\\\\[\\s\\S]|[^"])+)"|\'((?:\\\\[\\s\\S]|[^\'])+)\'|((?:\\\\[\\s\\S]|[^"\'\\s])+)))?\\s*','gi');m.exports=l},{'unist-util-visit':65}],67:[function(b,a,c){'use strict';a.exports=function(a,b,c){return typeof b==='number'&&(c=b,b=(a.replace(/(?:s|x|z|ch|sh)$/i,'$&e').replace(/y$/i,'ie')+'s').replace(/i?e?s$/i,function(b){var c=a.slice(-1)===a.slice(-1).toLowerCase();return c?b.toLowerCase():b.toUpperCase()})),c===1?a:b}},{}]},{},[1])(1)}) +!function(b,a){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define([],b):(typeof window!=='undefined'?a=window:typeof global!=='undefined'?a=global:typeof self!=='undefined'?a=self:a=this,a.mdastLint=b())}(function(){return function a(b,c,e){function f(d,k){if(!c[d]){if(!b[d]){var i=typeof require=='function'&&require;if(!k&&i)return i(d,!0);if(g)return g(d,!0);var j=new Error("Cannot find module '"+d+"'");throw j.code='MODULE_NOT_FOUND',j}var h=c[d]={exports:{}};b[d][0].call(h.exports,function(c){var a=b[d][1][c];return f(a?a:c)},h,h.exports,a,b,c,e)}return c[d].exports}var g=typeof require=='function'&&require;for(var d=0;da)return;g&&(d.push({start:e,end:a}),g=!1),e=a}var i=h.children[h.children.length-1],d=[],e=0,g=!1;if(!(b&&b.messages&&b.messages.length))return;c(h,function(b){var c=a.start(b),d=a.end(b);f(c&&c.offset),b.children||f(d&&d.offset)}),e===a.end(i).offset&&(f(),f(b.toString().length-1)),b.messages=b.messages.filter(function(a){var e=b.lintRanges[a.ruleId],g=e&&e.length,f=d.length,i=-1,h,c;a.line||(a.line=1),a.column||(a.column=1),h=b.positionToOffset(a);while(f--)if(d[f].start<=h&&d[f].end>h)return!1;while(--g>i)if(c=e[g],c.position.line0?'Add':'Remove',d=Math.abs(d),d!==0&&g.warn(i+' '+d+' '+f('space',d)+' between blockquote and content',a.start(e.children[0]))):b=c(e)}),h()}var d=b('unist-util-visit'),e=b('mdast-util-to-string'),f=b('plur'),a=b('mdast-util-position');g.exports=h},{'mdast-util-position':62,'mdast-util-to-string':63,plur:65,'unist-util-visit':66}],5:[function(f,i,j){'use strict';function h(j,h,f,k){var i=h.toString();(f==='consistent'||typeof f!=='object')&&(f={}),f.unchecked||(f.unchecked=null),f.checked||(f.checked=null),f.unchecked!==null&&e[f.unchecked]!==!0&&h.fail('Invalid unchecked checkbox marker `'+f.unchecked+"`: use either `'\\t'`, or `' '`"),f.checked!==null&&g[f.checked]!==!0&&h.fail('Invalid checked checkbox marker `'+f.checked+"`: use either `'x'`, or `'X'`"),c(j,'listItem',function(c){var e,k,n,l,g,j,m;if(c.checked!==Boolean(c.checked)||a.generated(c))return;e=c.checked?'checked':'unchecked',k=b(c).offset,n=(c.children.length?b(c.children[0]):d(c)).offset,g=i.slice(k,n).trimRight().slice(0,-1),m=g.charAt(g.length-1),j=f[e],j===null?f[e]=m:m!==j&&(l=k+g.length,h.warn(e.charAt(0).toUpperCase()+e.slice(1)+' checkboxes should use `'+j+'` as a marker',{start:h.offsetToPosition(l-1),end:h.offsetToPosition(l)}))}),k()}var c=f('unist-util-visit'),a=f('mdast-util-position'),b=a.start,d=a.end,g={x:!0,X:!0},e={' ':!0,' ':!0};i.exports=h},{'mdast-util-position':62,'unist-util-visit':66}],6:[function(c,f,h){'use strict';function g(g,c,i,h){var f=c.toString();d(g,'listItem',function(d){var i,g,h;if(d.checked!==Boolean(d.checked)||a.generated(d))return;i=b(d).offset,g=(d.children.length?b(d.children[0]):e(d)).offset;while(/[^\S\n]/.test(f.charAt(g)))g++;if(h=f.slice(i,g),h=h.slice(h.indexOf(']')+1),h.length===1)return;c.warn('Checkboxes should be followed by a single character',{start:c.offsetToPosition(g-h.length+1),end:c.offsetToPosition(g)})}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b=a.start,e=a.end;f.exports=g},{'mdast-util-position':62,'unist-util-visit':66}],7:[function(b,g,i){'use strict';function h(i,g,b,j){function k(b){var c=d(b).offset,f=e(b).offset;return a.generated(b)?null:b.lang||/^\s*([~`])\1{2,}/.test(h.slice(c,f))?'fenced':'indented'}var h=g.toString();if(b=typeof b!=='string'||b==='consistent'?null:b,f[b]!==!0){g.fail('Invalid code block style `'+b+"`: use either `'consistent'`, `'fenced'`, or `'indented'`");return}c(i,'code',function(c){var a=k(c);if(!a)return;b?b!==a&&g.warn('Code blocks should be '+b,c):b=a}),j()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end,f={null:!0,fenced:!0,indented:!0};g.exports=h},{'mdast-util-position':62,'unist-util-visit':66}],8:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var f=a.start(b).offset,h=a.end(b).offset,c;if(a.generated(b))return;c=g.slice(f,h).match(d)[1],c!==c.toLowerCase()&&e.warn('Do not use upper-case characters in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':62,'unist-util-visit':66}],9:[function(c,e,g){'use strict';function f(c,e,i,h){function f(b){var c=a.start(b).offset,f=a.end(b).offset,h;if(a.generated(b))return;h=g.slice(c,f).match(d)[1],/[ \t\n]{2,}/.test(h)&&e.warn('Do not use consecutive white-space in definition labels',b)}var g=e.toString();b(c,'definition',f),b(c,'footnoteDefinition',f),h()}var b=c('unist-util-visit'),a=c('mdast-util-position'),d=/^\s*\[((?:\\[\s\S]|[^\[\]])+)\]/;e.exports=f},{'mdast-util-position':62,'unist-util-visit':66}],10:[function(b,e,g){'use strict';function f(f,e,b,g){if(b=typeof b!=='string'||b==='consistent'?null:b,d[b]!==!0){e.fail('Invalid emphasis marker `'+b+"`: use either `'consistent'`, `'*'`, or `'_'`");return}c(f,'emphasis',function(c){var d=e.toString().charAt(a.start(c).offset);if(a.generated(c))return;b?d!==b&&e.warn('Emphasis should use `'+b+'` as a marker',c):b=d}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d={'*':!0,_:!0,null:!0};e.exports=f},{'mdast-util-position':62,'unist-util-visit':66}],11:[function(b,f,h){'use strict';function g(j,g,b,k){var i=g.toString(),h=!1,f=[];typeof b==='object'&&!('length'in b)&&(h=Boolean(b.allowEmpty),b=b.flags),typeof b==='object'&&'length'in b&&(f=String(b).split(',')),c(j,'code',function(b){var c=i.slice(d(b).offset,e(b).offset);if(a.generated(b))return;b.lang?f.length&&f.indexOf(b.lang)===-1&&g.warn('Invalid code-language flag',b):/^\ {0,3}([~`])\1{2,}/.test(c)&&!h&&g.warn('Missing code-language flag',b)}),k()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start,e=a.end;f.exports=g},{'mdast-util-position':62,'unist-util-visit':66}],12:[function(c,e,g){'use strict';function f(g,e,c,h){var f=e.toString();if(c=typeof c!=='string'||c==='consistent'?null:c,b[c]!==!0){e.fail('Invalid fenced code marker `'+c+"`: use either `'consistent'`, `` '`' ``, or `'~'`");return}d(g,'code',function(g){var d=f.substr(a.start(g).offset,4);if(a.generated(g))return;if(d=d.trimLeft().charAt(0),b[d]!==!0)return;c?d!==c&&e.warn('Fenced code should use '+c+' as a marker',g):c=d}),h()}var d=c('unist-util-visit'),a=c('mdast-util-position'),b={'`':!0,'~':!0,null:!0};e.exports=f},{'mdast-util-position':62,'unist-util-visit':66}],13:[function(c,a,d){'use strict';function b(e,c,a,d){var b=c.extension;a=typeof a==='string'?a:'md',b!==''&&b!==a&&c.warn('Invalid extension: use `'+a+'`'),d()}a.exports=b},{}],14:[function(b,e,g){'use strict';function f(e,f,h,g){var b=null;c(e,function(c){var e=d(c).line;if(c.type==='root'||a.generated(c))return;c.type==='definition'?b!==null&&b>e&&f.warn('Move definitions to the end of the file (after the node at line `'+b+'`)',c):b===null&&(b=e)},!0),g()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=a.start;e.exports=f},{'mdast-util-position':62,'unist-util-visit':66}],15:[function(c,a,d){'use strict';function b(e,c,f,d){var a=c.toString(),b=a.length-1;b>0&&a.charAt(b)!=='\n'&&c.warn('Missing newline character at end of file'),d()}a.exports=b},{}],16:[function(a,d,f){'use strict';function e(a,d,f,e){b(a,'heading',function(a){return c.generated(a)?null:(a.depth!==1&&d.warn('First heading level should be `1`',a),!1)}),e()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':62,'unist-util-visit':66}],17:[function(b,d,f){'use strict';function e(e,b,g,f){var d=b.toString();c(e,'break',function(c){var e=a.start(c).offset,f=a.end(c).offset;if(a.generated(c))return;d.slice(e,f).length>3&&b.warn('Use two spaces for hard line breaks',c)}),f()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':62,'unist-util-visit':66}],18:[function(a,d,f){'use strict';function e(d,e,g,f){var a=null;b(d,'heading',function(b){var d=b.depth;if(c.generated(b))return;a&&d>a+1&&e.warn('Heading levels should increment by one level at a time',b),a=d}),f()}var b=a('unist-util-visit'),c=a('mdast-util-position');d.exports=e},{'mdast-util-position':62,'unist-util-visit':66}],19:[function(a,f,h){'use strict';function g(f,g,a,h){a=e.indexOf(a)===-1?null:a,c(f,'heading',function(c){if(d.generated(c))return;a?b(c,a)!==a&&g.warn('Headings should use '+a,c):a=b(c,a)}),h()}var c=a('unist-util-visit'),b=a('mdast-util-heading-style'),d=a('mdast-util-position'),e=['atx','atx-closed','setext'];f.exports=g},{'mdast-util-heading-style':61,'mdast-util-position':62,'unist-util-visit':66}],20:[function(a,b,c){'use strict';b.exports={'no-auto-link-without-protocol':a('./no-auto-link-without-protocol'),'no-literal-urls':a('./no-literal-urls'),'no-consecutive-blank-lines':a('./no-consecutive-blank-lines'),'no-missing-blank-lines':a('./no-missing-blank-lines'),'blockquote-indentation':a('./blockquote-indentation'),'no-blockquote-without-caret':a('./no-blockquote-without-caret'),'code-block-style':a('./code-block-style'),'checkbox-content-indent':a('./checkbox-content-indent'),'checkbox-character-style':a('./checkbox-character-style'),'definition-case':a('./definition-case'),'definition-spacing':a('./definition-spacing'),'no-emphasis-as-heading':a('./no-emphasis-as-heading'),'emphasis-marker':a('./emphasis-marker'),'fenced-code-flag':a('./fenced-code-flag'),'fenced-code-marker':a('./fenced-code-marker'),'file-extension':a('./file-extension'),'final-newline':a('./final-newline'),'no-file-name-articles':a('./no-file-name-articles'),'no-file-name-consecutive-dashes':a('./no-file-name-consecutive-dashes'),'no-file-name-irregular-characters':a('./no-file-name-irregular-characters'),'no-file-name-mixed-case':a('./no-file-name-mixed-case'),'no-file-name-outer-dashes':a('./no-file-name-outer-dashes'),'final-definition':a('./final-definition'),'hard-break-spaces':a('./hard-break-spaces'),'heading-increment':a('./heading-increment'),'no-heading-content-indent':a('./no-heading-content-indent'),'no-heading-indent':a('./no-heading-indent'),'first-heading-level':a('./first-heading-level'),'maximum-heading-length':a('./maximum-heading-length'),'no-heading-punctuation':a('./no-heading-punctuation'),'heading-style':a('./heading-style'),'no-multiple-toplevel-headings':a('./no-multiple-toplevel-headings'),'no-duplicate-headings':a('./no-duplicate-headings'),'no-duplicate-definitions':a('./no-duplicate-definitions'),'no-html':a('./no-html'),'no-inline-padding':a('./no-inline-padding'),'maximum-line-length':a('./maximum-line-length'),'link-title-style':a('./link-title-style'),'list-item-bullet-indent':a('./list-item-bullet-indent'),'list-item-content-indent':a('./list-item-content-indent'),'list-item-indent':a('./list-item-indent'),'list-item-spacing':a('./list-item-spacing'),'ordered-list-marker-style':a('./ordered-list-marker-style'),'ordered-list-marker-value':a('./ordered-list-marker-value'),'no-shortcut-reference-image':a('./no-shortcut-reference-image'),'no-shortcut-reference-link':a('./no-shortcut-reference-link'),'rule-style':a('./rule-style'),'no-shell-dollars':a('./no-shell-dollars'),'strong-marker':a('./strong-marker'),'no-table-indentation':a('./no-table-indentation'),'table-pipe-alignment':a('./table-pipe-alignment'),'table-cell-padding':a('./table-cell-padding'),'table-pipes':a('./table-pipes'),'no-tabs':a('./no-tabs'),'unordered-list-marker-style':a('./unordered-list-marker-style')}},{'./blockquote-indentation':4,'./checkbox-character-style':5,'./checkbox-content-indent':6,'./code-block-style':7,'./definition-case':8,'./definition-spacing':9,'./emphasis-marker':10,'./fenced-code-flag':11,'./fenced-code-marker':12,'./file-extension':13,'./final-definition':14,'./final-newline':15,'./first-heading-level':16,'./hard-break-spaces':17,'./heading-increment':18,'./heading-style':19,'./link-title-style':21,'./list-item-bullet-indent':22,'./list-item-content-indent':23,'./list-item-indent':24,'./list-item-spacing':25,'./maximum-heading-length':26,'./maximum-line-length':27,'./no-auto-link-without-protocol':28,'./no-blockquote-without-caret':29,'./no-consecutive-blank-lines':30,'./no-duplicate-definitions':31,'./no-duplicate-headings':32,'./no-emphasis-as-heading':33,'./no-file-name-articles':34,'./no-file-name-consecutive-dashes':35,'./no-file-name-irregular-characters':36,'./no-file-name-mixed-case':37,'./no-file-name-outer-dashes':38,'./no-heading-content-indent':39,'./no-heading-indent':40,'./no-heading-punctuation':41,'./no-html':42,'./no-inline-padding':43,'./no-literal-urls':44,'./no-missing-blank-lines':45,'./no-multiple-toplevel-headings':46,'./no-shell-dollars':47,'./no-shortcut-reference-image':48,'./no-shortcut-reference-link':49,'./no-table-indentation':50,'./no-tabs':51,'./ordered-list-marker-style':52,'./ordered-list-marker-value':53,'./rule-style':54,'./strong-marker':55,'./table-cell-padding':56,'./table-pipe-alignment':57,'./table-pipes':58,'./unordered-list-marker-style':59}],21:[function(d,f,h){'use strict';function g(g,f,d,j){function h(h){var a=e(h).offset-1,g,j;if(b.generated(h))return;h.type!=='definition'&&a--;while(a){if(g=i.charAt(a),!/\s/.test(g))break;a--}if(!(g in c))return;d?d!==g&&(j=f.offsetToPosition(a+1),f.warn(d===')'?'Titles should use `()` as a quote':'Titles should use `'+d+'` as a quote',j)):d=g}var i=f.toString();if(d=typeof d!=='string'||d==='consistent'?null:d,(d==='()'||d==='(')&&(d=')'),c[d]!==!0){f.fail('Invalid link title style marker `'+d+"`: use either `'consistent'`, `'\"'`, `'\\''`, or `'()'`");return}a(g,'link',h),a(g,'image',h),a(g,'definition',h),j()}var a=d('unist-util-visit'),b=d('mdast-util-position'),c={'"':!0,"'":!0,')':!0,null:!0},e=b.end;f.exports=g},{'mdast-util-position':62,'unist-util-visit':66}],22:[function(b,f,h){'use strict';function g(g,b,i,h){var f=b.toString();d(g,'list',function(d){var g=d.children;g.forEach(function(j){var i=j.children[0],g=a(j).offset,k=a(i).offset,h;if(c.generated(d))return;h=f.slice(g,k).match(/^\s*/)[0].length,h!==0&&(g=a(i),b.warn('Incorrect indentation before bullet: remove '+h+' '+e('space',h),{line:g.line,column:g.column-h}))})}),h()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start;f.exports=g},{'mdast-util-position':62,plur:65,'unist-util-visit':66}],23:[function(a,f,h){'use strict';function g(g,a,i,h){var f=a.toString();d(g,'listItem',function(d){var g;d.children.forEach(function(l,n){var j=c(l),h=j.column,k,i,m;if(b.generated(l))return;if(n===0){if(Boolean(d.checked)===d.checked){k=j.offset;while(f.charAt(k)!=='[')k--;h-=j.offset-k}g=h;return}h!==g&&(i=g-h,m=i>0?'add':'remove',i=Math.abs(i),a.warn('Don’t use mixed indentation for children, '+m+' '+i+' '+e('space',i),{line:c(l).line,column:h}))})}),h()}var d=a('unist-util-visit'),b=a('mdast-util-position'),e=a('plur'),c=b.start;f.exports=g},{'mdast-util-position':62,plur:65,'unist-util-visit':66}],24:[function(b,g,i){'use strict';function h(i,g,b,j){var h=g.toString();if(b=typeof b!=='string'?'tab-size':b,f[b]!==!0){g.fail('Invalid list-item indent style `'+b+"`: use either `'tab-size'`, `'space'`, or `'mixed'`");return}d(i,'list',function(d){var f=d.children,i=d.ordered,j=d.start||1;if(c.generated(d))return;f.forEach(function(r,s){var m=r.children[0],l=i?String(j+s).length+1:1,n=Math.ceil(l/4)*4,o=a(r).offset,p=a(m).offset,f,k,c,q;f=h.slice(o,p),f=f.replace(/\[[x ]?\]\s*$/i,''),b==='tab-size'?k=n:b==='space'?k=l+1:k=d.loose?n:l+1,f.length!==k&&(c=k-f.length,q=c>0?'add':'remove',c=Math.abs(c),g.warn('Incorrect list-item indent: '+q+' '+c+' '+e('space',c),a(m)))})}),j()}var d=b('unist-util-visit'),c=b('mdast-util-position'),e=b('plur'),a=c.start,f={'tab-size':!0,mixed:!0,space:!0};g.exports=h},{'mdast-util-position':62,plur:65,'unist-util-visit':66}],25:[function(d,f,h){'use strict';function g(d,f,h,g){e(d,'list',function(g){var d=g.children,e=!0,h=b(g).column,i;if(a.generated(g))return;d.forEach(function(h){var a=h.children,d=a[0],f=a[a.length-1],g=c(f).line-b(d).line>0;g&&(e=!1)}),i=e?'tight':'loose',d.forEach(function(g,k){var a=d[k+1],j=c(g).column>h;if(!a)return;j!==e&&f.warn('List item should be '+i+', isn’t',{start:c(g),end:b(a)})})}),g()}var e=d('unist-util-visit'),a=d('mdast-util-position'),b=a.start,c=a.end;f.exports=g},{'mdast-util-position':62,'unist-util-visit':66}],26:[function(a,e,g){'use strict';function f(e,f,a,g){a=isNaN(a)||typeof a!=='number'?60:a,b(e,'heading',function(b){if(d.generated(b))return;c(b).length>a&&f.warn('Use headings shorter than `'+a+'`',b)}),g()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':62,'mdast-util-to-string':63,'unist-util-visit':66}],27:[function(e,f,i){'use strict';function g(a){return a.type==='heading'||a.type==='table'||a.type==='code'||a.type==='definition'}function h(k,l,j,q){function p(a,b){a--;while(++ae||h.columne&&l.warn('Line must be at most '+e+' characters',{line:h+1,column:i+1});q()}var b=e('unist-util-visit'),a=e('mdast-util-position'),c=a.start,d=a.end;f.exports=h},{'mdast-util-position':62,'unist-util-visit':66}],28:[function(d,j,k){'use strict';function i(a){return g.test(f(a))}function h(d,f,h,g){e(d,'link',function(d){var e=c(d.children[0]).column,g=b(d.children[d.children.length-1]).column,h=c(d).column,j=b(d).column;if(a.generated(d))return;h===e-1&&j===g+1&&!i(d)&&f.warn('All automatic links must start with a protocol',d)}),g()}var e=d('unist-util-visit'),f=d('mdast-util-to-string'),a=d('mdast-util-position'),c=a.start,b=a.end,g=/^[a-z][a-z+.-]+:\/?/i;j.exports=h},{'mdast-util-position':62,'mdast-util-to-string':63,'unist-util-visit':66}],29:[function(b,d,f){'use strict';function e(f,b,h,g){var d=b.toString(),e=d.length;c(f,'blockquote',function(c){var g=a.start(c).line,f=c.position&&c.position.indent;if(a.generated(c)||!f||!f.length)return;f.forEach(function(h,i){var a,c=g+i+1,f=b.positionToOffset({line:c,column:h})-1;while(++f')return;if(a!==' '&&a!==' ')break}b.warn('Missing caret in blockquote',{line:c,column:h})})}),g()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':62,'unist-util-visit':66}],30:[function(b,f,h){'use strict';function g(f,g,i,h){function b(e,b,f){var a=b.line-e.line,c=a>0?'before':'after';a=Math.abs(a)-f,a>0&&g.warn('Remove '+a+' '+d('line',a)+' '+c+' node',b)}c(f,function(d){var c=d.children;if(a.generated(d))return;c&&c[0]&&(b(a.start(d),a.start(c[0]),0),c.forEach(function(f,h){var d=c[h-1],g=e;if(!d||a.generated(d)||a.generated(f))return;(d.type==='list'&&f.type==='list'||f.type==='code'&&d.type==='list'&&!f.lang)&&g++,b(a.end(d),a.start(f),g)}),b(a.end(d),a.end(c[c.length-1]),1))}),h()}var c=b('unist-util-visit'),a=b('mdast-util-position'),d=b('plur'),e=2;f.exports=g},{'mdast-util-position':62,plur:65,'unist-util-visit':66}],31:[function(c,d,f){'use strict';function e(d,f,h,g){function e(b){var d=c[b.identifier],e;if(a.generated(b))return;d&&d.type&&(e=a.start(d),f.warn('Do not use definitions with the same identifier ('+e.line+':'+e.column+')',b)),c[b.identifier]=b}var c={};b(d,'definition',e),b(d,'footnoteDefinition',e),g()}var a=c('mdast-util-position'),b=c('unist-util-visit');d.exports=e},{'mdast-util-position':62,'unist-util-visit':66}],32:[function(a,e,g){'use strict';function f(e,f,h,g){var a={};c(e,'heading',function(c){var g=d(c).toUpperCase(),e=a[g],h;if(b.generated(c))return;e&&e.type==='heading'&&(h=b.start(e),f.warn('Do not use headings with similar content ('+h.line+':'+h.column+')',c)),a[g]=c}),g()}var b=a('mdast-util-position'),c=a('unist-util-visit'),d=a('mdast-util-to-string');e.exports=f},{'mdast-util-position':62,'mdast-util-to-string':63,'unist-util-visit':66}],33:[function(a,e,g){'use strict';function f(a,e,g,f){b(a,'paragraph',function(b,j,k){var f=b.children,a=f[0],g=k.children[j-1],h=k.children[j+1],i;if(d.generated(b))return;(!g||g.type!=='heading')&&h&&h.type==='paragraph'&&f.length===1&&(a.type==='emphasis'||a.type==='strong')&&(i=c(a),i.charAt(i.length-1)===':'&&e.warn('Don’t use emphasis to introduce a section, use a heading',b))}),f()}var b=a('unist-util-visit'),c=a('mdast-util-to-string'),d=a('mdast-util-position');e.exports=f},{'mdast-util-position':62,'mdast-util-to-string':63,'unist-util-visit':66}],34:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/^(the|an?)\b/i);b&&a.warn('Do not start file names with `'+b[0]+'`'),c()}a.exports=b},{}],35:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/-{2,}/.test(a.filename)&&a.warn('Do not use consecutive dashes in a file name'),b()}a.exports=b},{}],36:[function(c,a,d){'use strict';function b(d,a,e,c){var b=a.filename&&a.filename.match(/[^.a-zA-Z0-9-]/);b&&a.warn('Do not use `'+b[0]+'` in a file name'),c()}a.exports=b},{}],37:[function(c,a,d){'use strict';function b(d,b,e,c){var a=b.filename;a&&!(a===a.toLowerCase()||a===a.toUpperCase())&&b.warn('Do not mix casing in file names'),c()}a.exports=b},{}],38:[function(c,a,d){'use strict';function b(c,a,d,b){a.filename&&/^-|-$/.test(a.filename)&&a.warn('Do not use initial or final dashes in a file name'),b()}a.exports=b},{}],39:[function(c,i,j){'use strict';function h(i,c,k,j){var h=c.toString();f(i,'heading',function(i){var n=i.depth,k=i.children,l=g(i,'atx'),m,o,f,p,j;if(b.generated(i))return;if(l==='atx'||l==='atx-closed'){m=a(i),j=m.offset;while(h.charAt(j)!=='#')j++;j=n+(j-m.offset),f=a(k[0]).column-m.column-1-j,f&&(p=f>0?'Remove':'Add',f=Math.abs(f),c.warn(p+' '+f+' '+e('space',f)+' before this heading’s content',a(k[0])))}l==='atx-closed'&&(o=d(k[k.length-1]),f=d(i).column-o.column-1-n,f&&c.warn('Remove '+f+' '+e('space',f)+' after this heading’s content',o))}),j()}var f=c('unist-util-visit'),g=c('mdast-util-heading-style'),e=c('plur'),b=c('mdast-util-position'),a=b.start,d=b.end;i.exports=h},{'mdast-util-heading-style':61,'mdast-util-position':62,plur:65,'unist-util-visit':66}],40:[function(a,f,h){'use strict';function g(h,f,j,i){var a=f.toString(),g=a.length;c(h,'heading',function(l){var h=e(l),j=h.offset,i=j-1,k,c;if(b.generated(l))return;while(++i1&&b.warn('Do not indent table rows',c)})}),e()}var c=b('unist-util-visit'),a=b('mdast-util-position');d.exports=e},{'mdast-util-position':62,'unist-util-visit':66}],51:[function(c,a,d){'use strict';function b(f,b,g,e){var c=b.toString(),a=-1,d=c.length;while(++ac)return{line:b+1,column:c-(a[b-1]||0)+1};return{}}return b}function h(i,c){var e=String(c).split('\n'),h;if(!c||typeof c.contents!=='string')throw new Error('Missing `file` for mdast-range');e=d(e),h=f(e),c.offsetToPosition=g(e),c.positionToOffset=h,b(i,function(c){var b=c.position;b&&b.start&&a(b.start,h),b&&b.end&&a(b.end,h)})}function i(){return h}var b=e('unist-util-visit');c.exports=i},{'unist-util-visit':66}],61:[function(d,b,e){'use strict';function a(b,a){return b<3?'atx':a==='atx'||a==='setext'?a:null}function c(b,g){var c=b.children[b.children.length-1],d=b.depth,e=b&&b.position&&b.position.end,f=c&&c.position&&c.position.end;return e?c?f.line+1===e.line?'setext':f.column+d'+'\\s*'+')')}function f(b){var a={};return b.replace(e,function(g,c,d,e,f){var b=d||e||f||'';return b==='true'||b===''?b=!0:b==='false'?b=!1:isNaN(b)||(b=Number(b)),a[c]=b,''}),a}function a(a,b){function e(e,i){var g=e.value,c,h;return e.type!=='html'?null:(c=g.match(d),!c||c[1].length!==g.length||c[2]!==a.name?null:(h={type:c[3]||'marker',attributes:c[4]||'',parameters:f(c[4]||''),node:e},b&&b(h,i),h))}var c=a.name,d=g(c);return e}function b(e,b){var c=b.onparse,d=a(b,function(a,b){a.type==='marker'&&c(a,b)});return function(){var a=e.apply(this,arguments);return d(a,this),a}}function i(e,b){var c=b.onstringify,d=a(b,function(a,b){a.type==='marker'&&c(a,b)});return function(a){return d(a,this),e.apply(this,arguments)}}function j(i){function l(l,i,m){var a=k(l),d=a&&a.type;e&&m===e&&(d==='start'&&f++,d==='end'&&f--,d==='end'&&f===0?(b=j(g,b,a,{start:i-b.length-1,end:i,parent:e}),b&&c.apply(e.children,[h,i+1].concat(b)),g=null,e=null,h=null,b=[]):b.push(l)),!e&&d==='start'&&(f=1,h=i,g=a,e=m)}var j=i.onrun,k=a(i),b=[],g=null,e=null,f=0,h;return function(a){d(a,l)}}function k(c,a){var d=c.Parser.prototype.blockTokenizers,e=c.Parser.prototype.inlineTokenizers,f=c.Compiler.prototype;return a.onparse&&(d.html=b(d.html,a),e.tag=b(e.tag,a)),a.onstringify&&(f.html=i(f.html,a)),a.onrun?j(a):null}function l(a){if(!(a&&a.name))throw new Error('Missing `name` in `options`');return function(b){return k(b,a)}}var d=h('unist-util-visit'),c=[].splice,e=new RegExp('\\s*([-a-z09_]+)(?:=(?:"((?:\\\\[\\s\\S]|[^"])+)"|\'((?:\\\\[\\s\\S]|[^\'])+)\'|((?:\\\\[\\s\\S]|[^"\'\\s])+)))?\\s*','gi');m.exports=l},{'unist-util-visit':66}],65:[function(b,a,c){'use strict';a.exports=function(a,b,c){return typeof b==='number'&&(c=b,b=(a.replace(/(?:s|x|z|ch|sh)$/i,'$&e').replace(/y$/i,'ie')+'s').replace(/i?e?s$/i,function(b){var c=a.slice(-1)===a.slice(-1).toLowerCase();return c?b.toLowerCase():b.toUpperCase()})),c===1?a:b}},{}],66:[function(e,a,f){'use strict';function b(b,d){var a=-1,c=b.length;while(++ac)if(d(b[a],a)===!1)return!1;return!0}function d(i,a,d,f){var g,e,h;typeof a==='function'&&(f=d,d=a,a=null),g=f?c:b,h=function(a,b){return g(a,function(a,c){return a&&e(a,c,b)})},e=function(b,c,f){var e;return c=c||(f?0:null),(!a||b.type===a)&&(e=d(b,c,f||null)),b.children&&e!==!1?h(b.children,b):e},e(i)}a.exports=d},{}],67:[function(e,b,f){'use strict';function a(b,c,a){return(b[a]||0)-(c[a]||0)}function c(b,c){return a(b,c,'line')||a(b,c,'column')||-1}function d(a){return a.messages.sort(c),a}b.exports=d},{}]},{},[1])(1)}) diff --git a/package.json b/package.json index 35f66ddb..945acba8 100644 --- a/package.json +++ b/package.json @@ -9,28 +9,21 @@ "validate", "mdast" ], - "repository": { - "type": "git", - "url": "https://github.com/wooorm/mdast-lint.git" - }, - "author": { - "name": "Titus Wormer", - "email": "tituswormer@gmail.com" - }, + "repository": "wooorm/mdast-lint", + "author": "Titus Wormer ", "dependencies": { - "mdast-message-sort": "^0.1.0", - "mdast-range": "^0.4.0", - "mdast-util-heading-style": "^0.1.0", - "mdast-util-position": "^0.2.0", - "mdast-util-to-string": "^0.1.0", + "mdast-range": "^1.0.0", + "mdast-util-heading-style": "^1.0.0", + "mdast-util-position": "^1.0.0", + "mdast-util-to-string": "^1.0.0", + "mdast-zone": "^1.0.0", + "plur": "^2.0.0", "unist-util-visit": "^1.0.0", - "mdast-zone": "^0.2.1", - "plur": "^2.0.0" + "vfile-sort": "^1.0.0" }, "files": [ "index.js", - "lib/", - "LICENSE" + "lib/" ], "devDependencies": { "browserify": "^11.0.0", @@ -40,10 +33,10 @@ "istanbul": "^0.3.0", "jscs": "^2.0.0", "jscs-jsdoc": "^1.0.0", - "mdast": "^0.28.0", + "mdast": "^1.0.0", + "mdast-comment-config": "^1.0.0", "mdast-github": "^0.3.0", "mdast-toc": "^0.5.0", - "mdast-yaml-config": "^0.2.0", "mocha": "^2.0.0", "vfile": "^1.0.0" }, @@ -58,7 +51,7 @@ "lint": "npm run lint-api && npm run lint-style", "make": "npm run lint && npm run test-coverage", "build-rules": "node script/build-rule-documentation.js", - "build-md": "mdast . LICENSE --output --quiet", + "build-md": "mdast . --quiet", "build-bundle": "browserify index.js --bare -s mdastLint > mdast-lint.js", "postbuild-bundle": "esmangle mdast-lint.js > mdast-lint.min.js", "build": "npm run build-rules && npm run build-md && npm run build-bundle"