diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 42726a9d..b5b95507 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,3 +1,18 @@ +## [unrelease] + +**:warning:Breaking Changes:** + +**:cactus:Feature** + +**:butterfly:Optimization** + +- Rewrite `select all` when press `CtrlOrCmd + A` (#937) + +**:beetle:Bug fix** + +- Fixed some commonmark failed examples and add test case (#943) +- Fixed some bugs after press `backspace` (#934, #938) + ### 0.14.0 This update **fixes a XSS security vulnerability** when exporting a document. diff --git a/package.json b/package.json index 0a881e32..8a338d87 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js", "pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js", "test": "npm run unit && npm run e2e", + "test:specs": "node -r esm test/specs/commonMark/run.spec.js && node -r esm test/specs/gfm/run.spec.js", "unit": "cross-env NODE_ENV=test karma start test/unit/karma.conf.js", "preinstall": "node .electron-vue/preinstall.js", "postinstall": "npm run rebuild && npm run lint:fix", @@ -200,6 +201,7 @@ "vuex": "^3.1.0" }, "devDependencies": { + "@markedjs/html-differ": "^2.0.1", "babel-core": "^6.26.3", "babel-eslint": "^10.0.1", "babel-loader": "^7.1.5", @@ -212,6 +214,7 @@ "cfonts": "^2.4.2", "chai": "^4.2.0", "chalk": "^2.4.2", + "cheerio": "^1.0.0-rc.3", "copy-webpack-plugin": "^5.0.2", "cross-env": "^5.2.0", "css-loader": "^2.1.1", @@ -235,6 +238,7 @@ "eslint-plugin-promise": "^4.1.1", "eslint-plugin-standard": "^4.0.0", "eslint-plugin-vue": "^5.2.2", + "esm": "^3.2.22", "file-loader": "^3.0.1", "git-revision-webpack-plugin": "^3.0.3", "html-webpack-plugin": "^3.2.0", @@ -248,9 +252,11 @@ "karma-spec-reporter": "0.0.32", "karma-webpack": "^3.0.5", "license-checker": "^25.0.1", + "marked": "^0.6.2", "mini-css-extract-plugin": "^0.5.0", "mocha": "^6.0.2", "multispinner": "^0.2.1", + "node-fetch": "^2.3.0", "node-loader": "^0.6.0", "postcss-loader": "^3.0.0", "postcss-preset-env": "^6.6.0", diff --git a/src/muya/lib/parser/marked/blockRules.js b/src/muya/lib/parser/marked/blockRules.js index 730cb487..322be133 100644 --- a/src/muya/lib/parser/marked/blockRules.js +++ b/src/muya/lib/parser/marked/blockRules.js @@ -27,7 +27,7 @@ export const block = { + ')', def: /^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, table: noop, - lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, + lheading: /^([^\n]+)\n {0,3}(=|-){2,} *(?:\n+|$)/, paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/, text: /^[^\n]+/, diff --git a/src/muya/lib/parser/marked/inlineLexer.js b/src/muya/lib/parser/marked/inlineLexer.js index 1012adbc..e645b394 100644 --- a/src/muya/lib/parser/marked/inlineLexer.js +++ b/src/muya/lib/parser/marked/inlineLexer.js @@ -34,7 +34,7 @@ function InlineLexer (links, options) { */ InlineLexer.prototype.output = function (src) { - const { disableInline } = this.options + const { disableInline, emoji, math } = this.options if (disableInline) { return escape(src) } @@ -131,19 +131,23 @@ InlineLexer.prototype.output = function (src) { } // math - cap = this.rules.math.exec(src) - if (cap) { - src = src.substring(cap[0].length) - text = cap[1] - out += this.renderer.inlineMath(text) + if (math) { + cap = this.rules.math.exec(src) + if (cap) { + src = src.substring(cap[0].length) + text = cap[1] + out += this.renderer.inlineMath(text) + } } // emoji - cap = this.rules.emoji.exec(src) - if (cap) { - src = src.substring(cap[0].length) - text = cap[0] - out += this.renderer.emoji(text, cap[2]) + if (emoji) { + cap = this.rules.emoji.exec(src) + if (cap) { + src = src.substring(cap[0].length) + text = cap[0] + out += this.renderer.emoji(text, cap[2]) + } } // strong diff --git a/src/muya/lib/parser/marked/lexer.js b/src/muya/lib/parser/marked/lexer.js index b368f717..febae8aa 100644 --- a/src/muya/lib/parser/marked/lexer.js +++ b/src/muya/lib/parser/marked/lexer.js @@ -30,6 +30,7 @@ function Lexer (opts) { Lexer.prototype.lex = function (src) { src = src .replace(/\r\n|\r/g, '\n') + // replace `\t` to four space. .replace(/\t/g, ' ') .replace(/\u00a0/g, ' ') .replace(/\u2424/g, '\n') @@ -42,6 +43,7 @@ Lexer.prototype.lex = function (src) { */ Lexer.prototype.token = function (src, top) { + const { frontMatter, math } = this.options src = src.replace(/^ +$/gm, '') let loose @@ -57,15 +59,17 @@ Lexer.prototype.token = function (src, top) { // Only check front matter at the begining of a markdown file. // Why "checkFrontmatter" and "top"? See note in "blockquote". - cap = this.rules.frontmatter.exec(src) - if (this.checkFrontmatter && top && cap) { - src = src.substring(cap[0].length) - this.tokens.push({ - type: 'frontmatter', - text: cap[1] - }) + if (frontMatter) { + cap = this.rules.frontmatter.exec(src) + if (this.checkFrontmatter && top && cap) { + src = src.substring(cap[0].length) + this.tokens.push({ + type: 'frontmatter', + text: cap[1] + }) + } + this.checkFrontmatter = false } - this.checkFrontmatter = false while (src) { // newline @@ -80,29 +84,37 @@ Lexer.prototype.token = function (src, top) { } // code + // An indented code block cannot interrupt a paragraph. cap = this.rules.code.exec(src) if (cap) { + const lastToken = this.tokens[this.tokens.length - 1] src = src.substring(cap[0].length) - cap = cap[0].replace(/^ {4}/gm, '') - this.tokens.push({ - type: 'code', - codeBlockStyle: 'indented', - text: !this.options.pedantic - ? rtrim(cap, '\n') - : cap - }) + if (lastToken && lastToken.type === 'paragraph') { + lastToken.text += `\n${cap[0].trimRight()}` + } else { + cap = cap[0].replace(/^ {4}/gm, '') + this.tokens.push({ + type: 'code', + codeBlockStyle: 'indented', + text: !this.options.pedantic + ? rtrim(cap, '\n') + : cap + }) + } continue } // multiple line math - cap = this.rules.multiplemath.exec(src) - if (cap) { - src = src.substring(cap[0].length) - this.tokens.push({ - type: 'multiplemath', - text: cap[1] - }) - continue + if (math) { + cap = this.rules.multiplemath.exec(src) + if (cap) { + src = src.substring(cap[0].length) + this.tokens.push({ + type: 'multiplemath', + text: cap[1] + }) + continue + } } // fences (gfm) @@ -232,7 +244,7 @@ Lexer.prototype.token = function (src, top) { // so it is seen as the next token. space = item.length let newBull - item = item.replace(/^ *([*+-]|\d+(?:\.|\))) */, function (m, p1) { + item = item.replace(/^ *([*+-]|\d+(?:\.|\))) {0,4}/, function (m, p1) { // Get and remove list item bullet newBull = p1 || bull return '' @@ -301,8 +313,10 @@ Lexer.prototype.token = function (src, top) { } // Determine whether item is loose or not. If previous item is loose // this item is also loose. - loose = next = next || /^ *([*+-]|\d{1,9}(?:\.|\)))( +\S+\n\n(?!\s*$)|\n\n(?!\s*$))/.test(itemWithBullet) - + // A list is loose if any of its constituent list items are separated by blank lines, + // or if any of its constituent list items directly contain two block-level elements with a blank line between them. + // loose = next = next || /^ *([*+-]|\d{1,9}(?:\.|\)))( +\S+\n\n(?!\s*$)|\n\n(?!\s*$))/.test(itemWithBullet) + loose = next = next || /\n\n(?!\s*$)/.test(item) // Check if previous line ends with a new line. if (!loose && (i !== 0 || l > 1) && prevItem.length !== 0 && prevItem.charAt(prevItem.length - 1) === '\n') { loose = next = true diff --git a/src/muya/lib/parser/marked/options.js b/src/muya/lib/parser/marked/options.js index c62e3303..b04d8585 100644 --- a/src/muya/lib/parser/marked/options.js +++ b/src/muya/lib/parser/marked/options.js @@ -2,6 +2,12 @@ export default { baseUrl: null, breaks: false, gfm: true, + // TODO: We set weather to support `emoji`, `math`, `frontMatter` default value to `true` + // After we add user setting, we maybe set math and frontMatter default value to false. + // User need to enable them in the user setting. + emoji: true, + math: true, + frontMatter: true, headerIds: true, headerPrefix: '', highlight: null, diff --git a/src/muya/lib/parser/marked/renderer.js b/src/muya/lib/parser/marked/renderer.js index 5ce1e039..129a545e 100644 --- a/src/muya/lib/parser/marked/renderer.js +++ b/src/muya/lib/parser/marked/renderer.js @@ -105,7 +105,7 @@ Renderer.prototype.listitem = function (text, checked) { // task list return '
  • ' + text + diff --git a/src/muya/lib/utils/importMarkdown.js b/src/muya/lib/utils/importMarkdown.js index a3aab617..3a4cd0f1 100644 --- a/src/muya/lib/utils/importMarkdown.js +++ b/src/muya/lib/utils/importMarkdown.js @@ -31,6 +31,7 @@ const importRegister = ContentState => { let block let value let parentList = [ rootState ] + const languageLoaded = new Set() while ((token = tokens.shift())) { switch (token.type) { @@ -102,7 +103,8 @@ const importRegister = ContentState => { this.appendChild(codeBlock, codeLine) }) const inputBlock = this.createBlock('span', lang) - if (lang) { + if (lang && !languageLoaded.has(lang)) { + languageLoaded.add(lang) loadLanguage(lang) .then(infoList => { if (!Array.isArray(infoList)) return @@ -171,7 +173,20 @@ const importRegister = ContentState => { this.appendChild(parentList[0], block) break } - case 'text': + case 'text': { + value = token.text + while (tokens[0].type === 'text') { + token = tokens.shift() + value += `\n${token.text}` + } + block = this.createBlock('p') + const lines = value.split(LINE_BREAKS_REG).map(line => this.createBlock('span', line)) + for (const line of lines) { + this.appendChild(block, line) + } + this.appendChild(parentList[0], block) + break + } case 'paragraph': { value = token.text block = this.createBlock('p') @@ -235,7 +250,7 @@ const importRegister = ContentState => { break } } - + languageLoaded.clear() return rootState.children.length ? rootState.children : [this.createBlockP()] } diff --git a/test/specs/commonMark/commonmark.0.29.json b/test/specs/commonMark/commonmark.0.29.json new file mode 100644 index 00000000..9dd94c0b --- /dev/null +++ b/test/specs/commonMark/commonmark.0.29.json @@ -0,0 +1,5320 @@ +[ + { + "markdown": "\tfoo\tbaz\t\tbim\n", + "html": "
    foo\tbaz\t\tbim\n
    \n", + "example": 1, + "start_line": 352, + "end_line": 357, + "section": "Tabs" + }, + { + "markdown": " \tfoo\tbaz\t\tbim\n", + "html": "
    foo\tbaz\t\tbim\n
    \n", + "example": 2, + "start_line": 359, + "end_line": 364, + "section": "Tabs" + }, + { + "markdown": " a\ta\n ὐ\ta\n", + "html": "
    a\ta\nὐ\ta\n
    \n", + "example": 3, + "start_line": 366, + "end_line": 373, + "section": "Tabs" + }, + { + "markdown": " - foo\n\n\tbar\n", + "html": "\n", + "example": 4, + "start_line": 379, + "end_line": 390, + "section": "Tabs" + }, + { + "markdown": "- foo\n\n\t\tbar\n", + "html": "\n", + "example": 5, + "start_line": 392, + "end_line": 404, + "section": "Tabs" + }, + { + "markdown": ">\t\tfoo\n", + "html": "
    \n
      foo\n
    \n
    \n", + "example": 6, + "start_line": 415, + "end_line": 422, + "section": "Tabs" + }, + { + "markdown": "-\t\tfoo\n", + "html": "\n", + "example": 7, + "start_line": 424, + "end_line": 433, + "section": "Tabs" + }, + { + "markdown": " foo\n\tbar\n", + "html": "
    foo\nbar\n
    \n", + "example": 8, + "start_line": 436, + "end_line": 443, + "section": "Tabs" + }, + { + "markdown": " - foo\n - bar\n\t - baz\n", + "html": "\n", + "example": 9, + "start_line": 445, + "end_line": 461, + "section": "Tabs" + }, + { + "markdown": "#\tFoo\n", + "html": "

    Foo

    \n", + "example": 10, + "start_line": 463, + "end_line": 467, + "section": "Tabs" + }, + { + "markdown": "*\t*\t*\t\n", + "html": "
    \n", + "example": 11, + "start_line": 469, + "end_line": 473, + "section": "Tabs" + }, + { + "markdown": "- `one\n- two`\n", + "html": "\n", + "example": 12, + "start_line": 496, + "end_line": 504, + "section": "Precedence" + }, + { + "markdown": "***\n---\n___\n", + "html": "
    \n
    \n
    \n", + "example": 13, + "start_line": 535, + "end_line": 543, + "section": "Thematic breaks" + }, + { + "markdown": "+++\n", + "html": "

    +++

    \n", + "example": 14, + "start_line": 548, + "end_line": 552, + "section": "Thematic breaks" + }, + { + "markdown": "===\n", + "html": "

    ===

    \n", + "example": 15, + "start_line": 555, + "end_line": 559, + "section": "Thematic breaks" + }, + { + "markdown": "--\n**\n__\n", + "html": "

    --\n**\n__

    \n", + "example": 16, + "start_line": 564, + "end_line": 572, + "section": "Thematic breaks" + }, + { + "markdown": " ***\n ***\n ***\n", + "html": "
    \n
    \n
    \n", + "example": 17, + "start_line": 577, + "end_line": 585, + "section": "Thematic breaks" + }, + { + "markdown": " ***\n", + "html": "
    ***\n
    \n", + "example": 18, + "start_line": 590, + "end_line": 595, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n ***\n", + "html": "

    Foo\n***

    \n", + "example": 19, + "start_line": 598, + "end_line": 604, + "section": "Thematic breaks" + }, + { + "markdown": "_____________________________________\n", + "html": "
    \n", + "example": 20, + "start_line": 609, + "end_line": 613, + "section": "Thematic breaks" + }, + { + "markdown": " - - -\n", + "html": "
    \n", + "example": 21, + "start_line": 618, + "end_line": 622, + "section": "Thematic breaks" + }, + { + "markdown": " ** * ** * ** * **\n", + "html": "
    \n", + "example": 22, + "start_line": 625, + "end_line": 629, + "section": "Thematic breaks" + }, + { + "markdown": "- - - -\n", + "html": "
    \n", + "example": 23, + "start_line": 632, + "end_line": 636, + "section": "Thematic breaks" + }, + { + "markdown": "- - - - \n", + "html": "
    \n", + "example": 24, + "start_line": 641, + "end_line": 645, + "section": "Thematic breaks" + }, + { + "markdown": "_ _ _ _ a\n\na------\n\n---a---\n", + "html": "

    _ _ _ _ a

    \n

    a------

    \n

    ---a---

    \n", + "example": 25, + "start_line": 650, + "end_line": 660, + "section": "Thematic breaks" + }, + { + "markdown": " *-*\n", + "html": "

    -

    \n", + "example": 26, + "start_line": 666, + "end_line": 670, + "section": "Thematic breaks" + }, + { + "markdown": "- foo\n***\n- bar\n", + "html": "\n
    \n\n", + "example": 27, + "start_line": 675, + "end_line": 687, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n***\nbar\n", + "html": "

    Foo

    \n
    \n

    bar

    \n", + "example": 28, + "start_line": 692, + "end_line": 700, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n---\nbar\n", + "html": "

    Foo

    \n

    bar

    \n", + "example": 29, + "start_line": 709, + "end_line": 716, + "section": "Thematic breaks" + }, + { + "markdown": "* Foo\n* * *\n* Bar\n", + "html": "\n
    \n\n", + "example": 30, + "start_line": 722, + "end_line": 734, + "section": "Thematic breaks" + }, + { + "markdown": "- Foo\n- * * *\n", + "html": "\n", + "example": 31, + "start_line": 739, + "end_line": 749, + "section": "Thematic breaks" + }, + { + "markdown": "# foo\n## foo\n### foo\n#### foo\n##### foo\n###### foo\n", + "html": "

    foo

    \n

    foo

    \n

    foo

    \n

    foo

    \n
    foo
    \n
    foo
    \n", + "example": 32, + "start_line": 768, + "end_line": 782, + "section": "ATX headings" + }, + { + "markdown": "####### foo\n", + "html": "

    ####### foo

    \n", + "example": 33, + "start_line": 787, + "end_line": 791, + "section": "ATX headings" + }, + { + "markdown": "#5 bolt\n\n#hashtag\n", + "html": "

    #5 bolt

    \n

    #hashtag

    \n", + "example": 34, + "start_line": 802, + "end_line": 809, + "section": "ATX headings" + }, + { + "markdown": "\\## foo\n", + "html": "

    ## foo

    \n", + "example": 35, + "start_line": 814, + "end_line": 818, + "section": "ATX headings" + }, + { + "markdown": "# foo *bar* \\*baz\\*\n", + "html": "

    foo bar *baz*

    \n", + "example": 36, + "start_line": 823, + "end_line": 827, + "section": "ATX headings" + }, + { + "markdown": "# foo \n", + "html": "

    foo

    \n", + "example": 37, + "start_line": 832, + "end_line": 836, + "section": "ATX headings" + }, + { + "markdown": " ### foo\n ## foo\n # foo\n", + "html": "

    foo

    \n

    foo

    \n

    foo

    \n", + "example": 38, + "start_line": 841, + "end_line": 849, + "section": "ATX headings" + }, + { + "markdown": " # foo\n", + "html": "
    # foo\n
    \n", + "example": 39, + "start_line": 854, + "end_line": 859, + "section": "ATX headings" + }, + { + "markdown": "foo\n # bar\n", + "html": "

    foo\n# bar

    \n", + "example": 40, + "start_line": 862, + "end_line": 868, + "section": "ATX headings" + }, + { + "markdown": "## foo ##\n ### bar ###\n", + "html": "

    foo

    \n

    bar

    \n", + "example": 41, + "start_line": 873, + "end_line": 879, + "section": "ATX headings" + }, + { + "markdown": "# foo ##################################\n##### foo ##\n", + "html": "

    foo

    \n
    foo
    \n", + "example": 42, + "start_line": 884, + "end_line": 890, + "section": "ATX headings" + }, + { + "markdown": "### foo ### \n", + "html": "

    foo

    \n", + "example": 43, + "start_line": 895, + "end_line": 899, + "section": "ATX headings" + }, + { + "markdown": "### foo ### b\n", + "html": "

    foo ### b

    \n", + "example": 44, + "start_line": 906, + "end_line": 910, + "section": "ATX headings" + }, + { + "markdown": "# foo#\n", + "html": "

    foo#

    \n", + "example": 45, + "start_line": 915, + "end_line": 919, + "section": "ATX headings", + "shouldFail": true + }, + { + "markdown": "### foo \\###\n## foo #\\##\n# foo \\#\n", + "html": "

    foo ###

    \n

    foo ###

    \n

    foo #

    \n", + "example": 46, + "start_line": 925, + "end_line": 933, + "section": "ATX headings", + "shouldFail": true + }, + { + "markdown": "****\n## foo\n****\n", + "html": "
    \n

    foo

    \n
    \n", + "example": 47, + "start_line": 939, + "end_line": 947, + "section": "ATX headings" + }, + { + "markdown": "Foo bar\n# baz\nBar foo\n", + "html": "

    Foo bar

    \n

    baz

    \n

    Bar foo

    \n", + "example": 48, + "start_line": 950, + "end_line": 958, + "section": "ATX headings" + }, + { + "markdown": "## \n#\n### ###\n", + "html": "

    \n

    \n

    \n", + "example": 49, + "start_line": 963, + "end_line": 971, + "section": "ATX headings", + "shouldFail": true + }, + { + "markdown": "Foo *bar*\n=========\n\nFoo *bar*\n---------\n", + "html": "

    Foo bar

    \n

    Foo bar

    \n", + "example": 50, + "start_line": 1006, + "end_line": 1015, + "section": "Setext headings" + }, + { + "markdown": "Foo *bar\nbaz*\n====\n", + "html": "

    Foo bar\nbaz

    \n", + "example": 51, + "start_line": 1020, + "end_line": 1027, + "section": "Setext headings", + "shouldFail": true + }, + { + "markdown": " Foo *bar\nbaz*\t\n====\n", + "html": "

    Foo bar\nbaz

    \n", + "example": 52, + "start_line": 1034, + "end_line": 1041, + "section": "Setext headings", + "shouldFail": true + }, + { + "markdown": "Foo\n-------------------------\n\nFoo\n=\n", + "html": "

    Foo

    \n

    Foo

    \n", + "example": 53, + "start_line": 1046, + "end_line": 1055, + "section": "Setext headings", + "shouldFail": true + }, + { + "markdown": " Foo\n---\n\n Foo\n-----\n\n Foo\n ===\n", + "html": "

    Foo

    \n

    Foo

    \n

    Foo

    \n", + "example": 54, + "start_line": 1061, + "end_line": 1074, + "section": "Setext headings" + }, + { + "markdown": " Foo\n ---\n\n Foo\n---\n", + "html": "
    Foo\n---\n\nFoo\n
    \n
    \n", + "example": 55, + "start_line": 1079, + "end_line": 1092, + "section": "Setext headings" + }, + { + "markdown": "Foo\n ---- \n", + "html": "

    Foo

    \n", + "example": 56, + "start_line": 1098, + "end_line": 1103, + "section": "Setext headings" + }, + { + "markdown": "Foo\n ---\n", + "html": "

    Foo\n---

    \n", + "example": 57, + "start_line": 1108, + "end_line": 1114, + "section": "Setext headings" + }, + { + "markdown": "Foo\n= =\n\nFoo\n--- -\n", + "html": "

    Foo\n= =

    \n

    Foo

    \n
    \n", + "example": 58, + "start_line": 1119, + "end_line": 1130, + "section": "Setext headings" + }, + { + "markdown": "Foo \n-----\n", + "html": "

    Foo

    \n", + "example": 59, + "start_line": 1135, + "end_line": 1140, + "section": "Setext headings" + }, + { + "markdown": "Foo\\\n----\n", + "html": "

    Foo\\

    \n", + "example": 60, + "start_line": 1145, + "end_line": 1150, + "section": "Setext headings" + }, + { + "markdown": "`Foo\n----\n`\n\n\n", + "html": "

    `Foo

    \n

    `

    \n

    <a title="a lot

    \n

    of dashes"/>

    \n", + "example": 61, + "start_line": 1156, + "end_line": 1169, + "section": "Setext headings" + }, + { + "markdown": "> Foo\n---\n", + "html": "
    \n

    Foo

    \n
    \n
    \n", + "example": 62, + "start_line": 1175, + "end_line": 1183, + "section": "Setext headings" + }, + { + "markdown": "> foo\nbar\n===\n", + "html": "
    \n

    foo\nbar\n===

    \n
    \n", + "example": 63, + "start_line": 1186, + "end_line": 1196, + "section": "Setext headings", + "shouldFail": true + }, + { + "markdown": "- Foo\n---\n", + "html": "\n
    \n", + "example": 64, + "start_line": 1199, + "end_line": 1207, + "section": "Setext headings" + }, + { + "markdown": "Foo\nBar\n---\n", + "html": "

    Foo\nBar

    \n", + "example": 65, + "start_line": 1214, + "end_line": 1221, + "section": "Setext headings", + "shouldFail": true + }, + { + "markdown": "---\nFoo\n---\nBar\n---\nBaz\n", + "html": "
    \n

    Foo

    \n

    Bar

    \n

    Baz

    \n", + "example": 66, + "start_line": 1227, + "end_line": 1239, + "section": "Setext headings" + }, + { + "markdown": "\n====\n", + "html": "

    ====

    \n", + "example": 67, + "start_line": 1244, + "end_line": 1249, + "section": "Setext headings" + }, + { + "markdown": "---\n---\n", + "html": "
    \n
    \n", + "example": 68, + "start_line": 1256, + "end_line": 1262, + "section": "Setext headings" + }, + { + "markdown": "- foo\n-----\n", + "html": "\n
    \n", + "example": 69, + "start_line": 1265, + "end_line": 1273, + "section": "Setext headings" + }, + { + "markdown": " foo\n---\n", + "html": "
    foo\n
    \n
    \n", + "example": 70, + "start_line": 1276, + "end_line": 1283, + "section": "Setext headings" + }, + { + "markdown": "> foo\n-----\n", + "html": "
    \n

    foo

    \n
    \n
    \n", + "example": 71, + "start_line": 1286, + "end_line": 1294, + "section": "Setext headings" + }, + { + "markdown": "\\> foo\n------\n", + "html": "

    > foo

    \n", + "example": 72, + "start_line": 1300, + "end_line": 1305, + "section": "Setext headings" + }, + { + "markdown": "Foo\n\nbar\n---\nbaz\n", + "html": "

    Foo

    \n

    bar

    \n

    baz

    \n", + "example": 73, + "start_line": 1331, + "end_line": 1341, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\n---\n\nbaz\n", + "html": "

    Foo\nbar

    \n
    \n

    baz

    \n", + "example": 74, + "start_line": 1347, + "end_line": 1359, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n* * *\nbaz\n", + "html": "

    Foo\nbar

    \n
    \n

    baz

    \n", + "example": 75, + "start_line": 1365, + "end_line": 1375, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\\---\nbaz\n", + "html": "

    Foo\nbar\n---\nbaz

    \n", + "example": 76, + "start_line": 1380, + "end_line": 1390, + "section": "Setext headings" + }, + { + "markdown": " a simple\n indented code block\n", + "html": "
    a simple\n  indented code block\n
    \n", + "example": 77, + "start_line": 1408, + "end_line": 1415, + "section": "Indented code blocks" + }, + { + "markdown": " - foo\n\n bar\n", + "html": "\n", + "example": 78, + "start_line": 1422, + "end_line": 1433, + "section": "Indented code blocks" + }, + { + "markdown": "1. foo\n\n - bar\n", + "html": "
      \n
    1. \n

      foo

      \n
        \n
      • bar
      • \n
      \n
    2. \n
    \n", + "example": 79, + "start_line": 1436, + "end_line": 1449, + "section": "Indented code blocks" + }, + { + "markdown": "
    \n *hi*\n\n - one\n", + "html": "
    <a/>\n*hi*\n\n- one\n
    \n", + "example": 80, + "start_line": 1456, + "end_line": 1467, + "section": "Indented code blocks" + }, + { + "markdown": " chunk1\n\n chunk2\n \n \n \n chunk3\n", + "html": "
    chunk1\n\nchunk2\n\n\n\nchunk3\n
    \n", + "example": 81, + "start_line": 1472, + "end_line": 1489, + "section": "Indented code blocks" + }, + { + "markdown": " chunk1\n \n chunk2\n", + "html": "
    chunk1\n  \n  chunk2\n
    \n", + "example": 82, + "start_line": 1495, + "end_line": 1504, + "section": "Indented code blocks" + }, + { + "markdown": "Foo\n bar\n\n", + "html": "

    Foo\nbar

    \n", + "example": 83, + "start_line": 1510, + "end_line": 1517, + "section": "Indented code blocks" + }, + { + "markdown": " foo\nbar\n", + "html": "
    foo\n
    \n

    bar

    \n", + "example": 84, + "start_line": 1524, + "end_line": 1531, + "section": "Indented code blocks" + }, + { + "markdown": "# Heading\n foo\nHeading\n------\n foo\n----\n", + "html": "

    Heading

    \n
    foo\n
    \n

    Heading

    \n
    foo\n
    \n
    \n", + "example": 85, + "start_line": 1537, + "end_line": 1552, + "section": "Indented code blocks" + }, + { + "markdown": " foo\n bar\n", + "html": "
        foo\nbar\n
    \n", + "example": 86, + "start_line": 1557, + "end_line": 1564, + "section": "Indented code blocks" + }, + { + "markdown": "\n \n foo\n \n\n", + "html": "
    foo\n
    \n", + "example": 87, + "start_line": 1570, + "end_line": 1579, + "section": "Indented code blocks" + }, + { + "markdown": " foo \n", + "html": "
    foo  \n
    \n", + "example": 88, + "start_line": 1584, + "end_line": 1589, + "section": "Indented code blocks" + }, + { + "markdown": "```\n<\n >\n```\n", + "html": "
    <\n >\n
    \n", + "example": 89, + "start_line": 1639, + "end_line": 1648, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~\n<\n >\n~~~\n", + "html": "
    <\n >\n
    \n", + "example": 90, + "start_line": 1653, + "end_line": 1662, + "section": "Fenced code blocks" + }, + { + "markdown": "``\nfoo\n``\n", + "html": "

    foo

    \n", + "example": 91, + "start_line": 1666, + "end_line": 1672, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n~~~\n```\n", + "html": "
    aaa\n~~~\n
    \n", + "example": 92, + "start_line": 1677, + "end_line": 1686, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~\naaa\n```\n~~~\n", + "html": "
    aaa\n```\n
    \n", + "example": 93, + "start_line": 1689, + "end_line": 1698, + "section": "Fenced code blocks" + }, + { + "markdown": "````\naaa\n```\n``````\n", + "html": "
    aaa\n```\n
    \n", + "example": 94, + "start_line": 1703, + "end_line": 1712, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~\naaa\n~~~\n~~~~\n", + "html": "
    aaa\n~~~\n
    \n", + "example": 95, + "start_line": 1715, + "end_line": 1724, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n", + "html": "
    \n", + "example": 96, + "start_line": 1730, + "end_line": 1734, + "section": "Fenced code blocks" + }, + { + "markdown": "`````\n\n```\naaa\n", + "html": "
    \n```\naaa\n
    \n", + "example": 97, + "start_line": 1737, + "end_line": 1747, + "section": "Fenced code blocks" + }, + { + "markdown": "> ```\n> aaa\n\nbbb\n", + "html": "
    \n
    aaa\n
    \n
    \n

    bbb

    \n", + "example": 98, + "start_line": 1750, + "end_line": 1761, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n\n \n```\n", + "html": "
    \n  \n
    \n", + "example": 99, + "start_line": 1766, + "end_line": 1775, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n```\n", + "html": "
    \n", + "example": 100, + "start_line": 1780, + "end_line": 1785, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\n aaa\naaa\n```\n", + "html": "
    aaa\naaa\n
    \n", + "example": 101, + "start_line": 1792, + "end_line": 1801, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\naaa\n aaa\naaa\n ```\n", + "html": "
    aaa\naaa\naaa\n
    \n", + "example": 102, + "start_line": 1804, + "end_line": 1815, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\n aaa\n aaa\n aaa\n ```\n", + "html": "
    aaa\n aaa\naaa\n
    \n", + "example": 103, + "start_line": 1818, + "end_line": 1829, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\n aaa\n ```\n", + "html": "
    ```\naaa\n```\n
    \n", + "example": 104, + "start_line": 1834, + "end_line": 1843, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n ```\n", + "html": "
    aaa\n
    \n", + "example": 105, + "start_line": 1849, + "end_line": 1856, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\naaa\n ```\n", + "html": "
    aaa\n
    \n", + "example": 106, + "start_line": 1859, + "end_line": 1866, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n ```\n", + "html": "
    aaa\n    ```\n
    \n", + "example": 107, + "start_line": 1871, + "end_line": 1879, + "section": "Fenced code blocks" + }, + { + "markdown": "``` ```\naaa\n", + "html": "

    \naaa

    \n", + "example": 108, + "start_line": 1885, + "end_line": 1891, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~~~\naaa\n~~~ ~~\n", + "html": "
    aaa\n~~~ ~~\n
    \n", + "example": 109, + "start_line": 1894, + "end_line": 1902, + "section": "Fenced code blocks" + }, + { + "markdown": "foo\n```\nbar\n```\nbaz\n", + "html": "

    foo

    \n
    bar\n
    \n

    baz

    \n", + "example": 110, + "start_line": 1908, + "end_line": 1919, + "section": "Fenced code blocks" + }, + { + "markdown": "foo\n---\n~~~\nbar\n~~~\n# baz\n", + "html": "

    foo

    \n
    bar\n
    \n

    baz

    \n", + "example": 111, + "start_line": 1925, + "end_line": 1937, + "section": "Fenced code blocks" + }, + { + "markdown": "```ruby\ndef foo(x)\n return 3\nend\n```\n", + "html": "
    def foo(x)\n  return 3\nend\n
    \n", + "example": 112, + "start_line": 1947, + "end_line": 1958, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~\n", + "html": "
    def foo(x)\n  return 3\nend\n
    \n", + "example": 113, + "start_line": 1961, + "end_line": 1972, + "section": "Fenced code blocks" + }, + { + "markdown": "````;\n````\n", + "html": "
    \n", + "example": 114, + "start_line": 1975, + "end_line": 1980, + "section": "Fenced code blocks" + }, + { + "markdown": "``` aa ```\nfoo\n", + "html": "

    aa\nfoo

    \n", + "example": 115, + "start_line": 1985, + "end_line": 1991, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~ aa ``` ~~~\nfoo\n~~~\n", + "html": "
    foo\n
    \n", + "example": 116, + "start_line": 1996, + "end_line": 2003, + "section": "Fenced code blocks", + "shouldFail": true + }, + { + "markdown": "```\n``` aaa\n```\n", + "html": "
    ``` aaa\n
    \n", + "example": 117, + "start_line": 2008, + "end_line": 2015, + "section": "Fenced code blocks" + }, + { + "markdown": "
    \n
    \n**Hello**,\n\n_world_.\n
    \n
    \n", + "html": "
    \n
    \n**Hello**,\n

    world.\n

    \n
    \n", + "example": 118, + "start_line": 2087, + "end_line": 2102, + "section": "HTML blocks" + }, + { + "markdown": "\n \n \n \n
    \n hi\n
    \n\nokay.\n", + "html": "\n \n \n \n
    \n hi\n
    \n

    okay.

    \n", + "example": 119, + "start_line": 2116, + "end_line": 2135, + "section": "HTML blocks" + }, + { + "markdown": "
    \n *hello*\n \n", + "html": "
    \n *hello*\n \n", + "example": 120, + "start_line": 2138, + "end_line": 2146, + "section": "HTML blocks" + }, + { + "markdown": "
    \n*foo*\n", + "html": "
    \n*foo*\n", + "example": 121, + "start_line": 2151, + "end_line": 2157, + "section": "HTML blocks" + }, + { + "markdown": "
    \n\n*Markdown*\n\n
    \n", + "html": "
    \n

    Markdown

    \n
    \n", + "example": 122, + "start_line": 2162, + "end_line": 2172, + "section": "HTML blocks" + }, + { + "markdown": "
    \n
    \n", + "html": "
    \n
    \n", + "example": 123, + "start_line": 2178, + "end_line": 2186, + "section": "HTML blocks" + }, + { + "markdown": "
    \n
    \n", + "html": "
    \n
    \n", + "example": 124, + "start_line": 2189, + "end_line": 2197, + "section": "HTML blocks" + }, + { + "markdown": "
    \n*foo*\n\n*bar*\n", + "html": "
    \n*foo*\n

    bar

    \n", + "example": 125, + "start_line": 2201, + "end_line": 2210, + "section": "HTML blocks" + }, + { + "markdown": "
    \n", + "html": "
    *foo*
    \n", + "example": 129, + "start_line": 2250, + "end_line": 2254, + "section": "HTML blocks" + }, + { + "markdown": "
    \nfoo\n
    \n", + "html": "
    \nfoo\n
    \n", + "example": 130, + "start_line": 2257, + "end_line": 2265, + "section": "HTML blocks" + }, + { + "markdown": "
    \n``` c\nint x = 33;\n```\n", + "html": "
    \n``` c\nint x = 33;\n```\n", + "example": 131, + "start_line": 2274, + "end_line": 2284, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n\n", + "html": "\n*bar*\n\n", + "example": 132, + "start_line": 2291, + "end_line": 2299, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n\n", + "html": "\n*bar*\n\n", + "example": 133, + "start_line": 2304, + "end_line": 2312, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n\n", + "html": "\n*bar*\n\n", + "example": 134, + "start_line": 2315, + "end_line": 2323, + "section": "HTML blocks" + }, + { + "markdown": "\n*bar*\n", + "html": "\n*bar*\n", + "example": 135, + "start_line": 2326, + "end_line": 2332, + "section": "HTML blocks" + }, + { + "markdown": "\n*foo*\n\n", + "html": "\n*foo*\n\n", + "example": 136, + "start_line": 2341, + "end_line": 2349, + "section": "HTML blocks" + }, + { + "markdown": "\n\n*foo*\n\n\n", + "html": "\n

    foo

    \n
    \n", + "example": 137, + "start_line": 2356, + "end_line": 2366, + "section": "HTML blocks" + }, + { + "markdown": "*foo*\n", + "html": "

    foo

    \n", + "example": 138, + "start_line": 2374, + "end_line": 2378, + "section": "HTML blocks" + }, + { + "markdown": "
    \nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
    \nokay\n", + "html": "
    \nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
    \n

    okay

    \n", + "example": 139, + "start_line": 2390, + "end_line": 2406, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\n

    okay

    \n", + "example": 140, + "start_line": 2411, + "end_line": 2425, + "section": "HTML blocks" + }, + { + "markdown": "\nh1 {color:red;}\n\np {color:blue;}\n\nokay\n", + "html": "\nh1 {color:red;}\n\np {color:blue;}\n\n

    okay

    \n", + "example": 141, + "start_line": 2430, + "end_line": 2446, + "section": "HTML blocks" + }, + { + "markdown": "\n\nfoo\n", + "html": "\n\nfoo\n", + "example": 142, + "start_line": 2453, + "end_line": 2463, + "section": "HTML blocks" + }, + { + "markdown": ">
    \n> foo\n\nbar\n", + "html": "
    \n
    \nfoo\n
    \n

    bar

    \n", + "example": 143, + "start_line": 2466, + "end_line": 2477, + "section": "HTML blocks" + }, + { + "markdown": "-
    \n- foo\n", + "html": "
      \n
    • \n
      \n
    • \n
    • foo
    • \n
    \n", + "example": 144, + "start_line": 2480, + "end_line": 2490, + "section": "HTML blocks" + }, + { + "markdown": "\n*foo*\n", + "html": "\n

    foo

    \n", + "example": 145, + "start_line": 2495, + "end_line": 2501, + "section": "HTML blocks" + }, + { + "markdown": "*bar*\n*baz*\n", + "html": "*bar*\n

    baz

    \n", + "example": 146, + "start_line": 2504, + "end_line": 2510, + "section": "HTML blocks" + }, + { + "markdown": "1. *bar*\n", + "html": "1. *bar*\n", + "example": 147, + "start_line": 2516, + "end_line": 2524, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\n

    okay

    \n", + "example": 148, + "start_line": 2529, + "end_line": 2541, + "section": "HTML blocks" + }, + { + "markdown": "';\n\n?>\nokay\n", + "html": "';\n\n?>\n

    okay

    \n", + "example": 149, + "start_line": 2547, + "end_line": 2561, + "section": "HTML blocks" + }, + { + "markdown": "\n", + "html": "\n", + "example": 150, + "start_line": 2566, + "end_line": 2570, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\n

    okay

    \n", + "example": 151, + "start_line": 2575, + "end_line": 2603, + "section": "HTML blocks" + }, + { + "markdown": " \n\n \n", + "html": " \n
    <!-- foo -->\n
    \n", + "example": 152, + "start_line": 2608, + "end_line": 2616, + "section": "HTML blocks" + }, + { + "markdown": "
    \n\n
    \n", + "html": "
    \n
    <div>\n
    \n", + "example": 153, + "start_line": 2619, + "end_line": 2627, + "section": "HTML blocks" + }, + { + "markdown": "Foo\n
    \nbar\n
    \n", + "html": "

    Foo

    \n
    \nbar\n
    \n", + "example": 154, + "start_line": 2633, + "end_line": 2643, + "section": "HTML blocks" + }, + { + "markdown": "
    \nbar\n
    \n*foo*\n", + "html": "
    \nbar\n
    \n*foo*\n", + "example": 155, + "start_line": 2650, + "end_line": 2660, + "section": "HTML blocks" + }, + { + "markdown": "Foo\n\nbaz\n", + "html": "

    Foo\n\nbaz

    \n", + "example": 156, + "start_line": 2665, + "end_line": 2673, + "section": "HTML blocks" + }, + { + "markdown": "
    \n\n*Emphasized* text.\n\n
    \n", + "html": "
    \n

    Emphasized text.

    \n
    \n", + "example": 157, + "start_line": 2706, + "end_line": 2716, + "section": "HTML blocks" + }, + { + "markdown": "
    \n*Emphasized* text.\n
    \n", + "html": "
    \n*Emphasized* text.\n
    \n", + "example": 158, + "start_line": 2719, + "end_line": 2727, + "section": "HTML blocks" + }, + { + "markdown": "\n\n\n\n\n\n\n\n
    \nHi\n
    \n", + "html": "\n\n\n\n
    \nHi\n
    \n", + "example": 159, + "start_line": 2741, + "end_line": 2761, + "section": "HTML blocks" + }, + { + "markdown": "\n\n \n\n \n\n \n\n
    \n Hi\n
    \n", + "html": "\n \n
    <td>\n  Hi\n</td>\n
    \n \n
    \n", + "example": 160, + "start_line": 2768, + "end_line": 2789, + "section": "HTML blocks" + }, + { + "markdown": "[foo]: /url \"title\"\n\n[foo]\n", + "html": "

    foo

    \n", + "example": 161, + "start_line": 2816, + "end_line": 2822, + "section": "Link reference definitions" + }, + { + "markdown": " [foo]: \n /url \n 'the title' \n\n[foo]\n", + "html": "

    foo

    \n", + "example": 162, + "start_line": 2825, + "end_line": 2833, + "section": "Link reference definitions" + }, + { + "markdown": "[Foo*bar\\]]:my_(url) 'title (with parens)'\n\n[Foo*bar\\]]\n", + "html": "

    Foo*bar]

    \n", + "example": 163, + "start_line": 2836, + "end_line": 2842, + "section": "Link reference definitions" + }, + { + "markdown": "[Foo bar]:\n\n'title'\n\n[Foo bar]\n", + "html": "

    Foo bar

    \n", + "example": 164, + "start_line": 2845, + "end_line": 2853, + "section": "Link reference definitions", + "shouldFail": true + }, + { + "markdown": "[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]\n", + "html": "

    foo

    \n", + "example": 165, + "start_line": 2858, + "end_line": 2872, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url 'title\n\nwith blank line'\n\n[foo]\n", + "html": "

    [foo]: /url 'title

    \n

    with blank line'

    \n

    [foo]

    \n", + "example": 166, + "start_line": 2877, + "end_line": 2887, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n/url\n\n[foo]\n", + "html": "

    foo

    \n", + "example": 167, + "start_line": 2892, + "end_line": 2899, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n\n[foo]\n", + "html": "

    [foo]:

    \n

    [foo]

    \n", + "example": 168, + "start_line": 2904, + "end_line": 2911, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: <>\n\n[foo]\n", + "html": "

    foo

    \n", + "example": 169, + "start_line": 2916, + "end_line": 2922, + "section": "Link reference definitions", + "shouldFail": true + }, + { + "markdown": "[foo]: (baz)\n\n[foo]\n", + "html": "

    [foo]: (baz)

    \n

    [foo]

    \n", + "example": 170, + "start_line": 2927, + "end_line": 2934, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]\n", + "html": "

    foo

    \n", + "example": 171, + "start_line": 2940, + "end_line": 2946, + "section": "Link reference definitions", + "shouldFail": true + }, + { + "markdown": "[foo]\n\n[foo]: url\n", + "html": "

    foo

    \n", + "example": 172, + "start_line": 2951, + "end_line": 2957, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n[foo]: first\n[foo]: second\n", + "html": "

    foo

    \n", + "example": 173, + "start_line": 2963, + "end_line": 2970, + "section": "Link reference definitions" + }, + { + "markdown": "[FOO]: /url\n\n[Foo]\n", + "html": "

    Foo

    \n", + "example": 174, + "start_line": 2976, + "end_line": 2982, + "section": "Link reference definitions" + }, + { + "markdown": "[ΑΓΩ]: /φου\n\n[αγω]\n", + "html": "

    αγω

    \n", + "example": 175, + "start_line": 2985, + "end_line": 2991, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n", + "html": "", + "example": 176, + "start_line": 2997, + "end_line": 3000, + "section": "Link reference definitions" + }, + { + "markdown": "[\nfoo\n]: /url\nbar\n", + "html": "

    bar

    \n", + "example": 177, + "start_line": 3005, + "end_line": 3012, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url \"title\" ok\n", + "html": "

    [foo]: /url "title" ok

    \n", + "example": 178, + "start_line": 3018, + "end_line": 3022, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n\"title\" ok\n", + "html": "

    "title" ok

    \n", + "example": 179, + "start_line": 3027, + "end_line": 3032, + "section": "Link reference definitions" + }, + { + "markdown": " [foo]: /url \"title\"\n\n[foo]\n", + "html": "
    [foo]: /url "title"\n
    \n

    [foo]

    \n", + "example": 180, + "start_line": 3038, + "end_line": 3046, + "section": "Link reference definitions" + }, + { + "markdown": "```\n[foo]: /url\n```\n\n[foo]\n", + "html": "
    [foo]: /url\n
    \n

    [foo]

    \n", + "example": 181, + "start_line": 3052, + "end_line": 3062, + "section": "Link reference definitions" + }, + { + "markdown": "Foo\n[bar]: /baz\n\n[bar]\n", + "html": "

    Foo\n[bar]: /baz

    \n

    [bar]

    \n", + "example": 182, + "start_line": 3067, + "end_line": 3076, + "section": "Link reference definitions" + }, + { + "markdown": "# [Foo]\n[foo]: /url\n> bar\n", + "html": "

    Foo

    \n
    \n

    bar

    \n
    \n", + "example": 183, + "start_line": 3082, + "end_line": 3091, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\nbar\n===\n[foo]\n", + "html": "

    bar

    \n

    foo

    \n", + "example": 184, + "start_line": 3093, + "end_line": 3101, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n===\n[foo]\n", + "html": "

    ===\nfoo

    \n", + "example": 185, + "start_line": 3103, + "end_line": 3110, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url\n \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]\n", + "html": "

    foo,\nbar,\nbaz

    \n", + "example": 186, + "start_line": 3116, + "end_line": 3129, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n> [foo]: /url\n", + "html": "

    foo

    \n
    \n
    \n", + "example": 187, + "start_line": 3137, + "end_line": 3145, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n", + "html": "", + "example": 188, + "start_line": 3154, + "end_line": 3157, + "section": "Link reference definitions" + }, + { + "markdown": "aaa\n\nbbb\n", + "html": "

    aaa

    \n

    bbb

    \n", + "example": 189, + "start_line": 3171, + "end_line": 3178, + "section": "Paragraphs" + }, + { + "markdown": "aaa\nbbb\n\nccc\nddd\n", + "html": "

    aaa\nbbb

    \n

    ccc\nddd

    \n", + "example": 190, + "start_line": 3183, + "end_line": 3194, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n\n\nbbb\n", + "html": "

    aaa

    \n

    bbb

    \n", + "example": 191, + "start_line": 3199, + "end_line": 3207, + "section": "Paragraphs" + }, + { + "markdown": " aaa\n bbb\n", + "html": "

    aaa\nbbb

    \n", + "example": 192, + "start_line": 3212, + "end_line": 3218, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n bbb\n ccc\n", + "html": "

    aaa\nbbb\nccc

    \n", + "example": 193, + "start_line": 3224, + "end_line": 3232, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "html": "

    aaa\nbbb

    \n", + "example": 194, + "start_line": 3238, + "end_line": 3244, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "html": "
    aaa\n
    \n

    bbb

    \n", + "example": 195, + "start_line": 3247, + "end_line": 3254, + "section": "Paragraphs" + }, + { + "markdown": "aaa \nbbb \n", + "html": "

    aaa
    \nbbb

    \n", + "example": 196, + "start_line": 3261, + "end_line": 3267, + "section": "Paragraphs" + }, + { + "markdown": " \n\naaa\n \n\n# aaa\n\n \n", + "html": "

    aaa

    \n

    aaa

    \n", + "example": 197, + "start_line": 3278, + "end_line": 3290, + "section": "Blank lines" + }, + { + "markdown": "> # Foo\n> bar\n> baz\n", + "html": "
    \n

    Foo

    \n

    bar\nbaz

    \n
    \n", + "example": 198, + "start_line": 3344, + "end_line": 3354, + "section": "Block quotes" + }, + { + "markdown": "># Foo\n>bar\n> baz\n", + "html": "
    \n

    Foo

    \n

    bar\nbaz

    \n
    \n", + "example": 199, + "start_line": 3359, + "end_line": 3369, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "
    \n

    Foo

    \n

    bar\nbaz

    \n
    \n", + "example": 200, + "start_line": 3374, + "end_line": 3384, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "
    > # Foo\n> bar\n> baz\n
    \n", + "example": 201, + "start_line": 3389, + "end_line": 3398, + "section": "Block quotes" + }, + { + "markdown": "> # Foo\n> bar\nbaz\n", + "html": "
    \n

    Foo

    \n

    bar\nbaz

    \n
    \n", + "example": 202, + "start_line": 3404, + "end_line": 3414, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n> foo\n", + "html": "
    \n

    bar\nbaz\nfoo

    \n
    \n", + "example": 203, + "start_line": 3420, + "end_line": 3430, + "section": "Block quotes" + }, + { + "markdown": "> foo\n---\n", + "html": "
    \n

    foo

    \n
    \n
    \n", + "example": 204, + "start_line": 3444, + "end_line": 3452, + "section": "Block quotes" + }, + { + "markdown": "> - foo\n- bar\n", + "html": "
    \n
      \n
    • foo
    • \n
    \n
    \n
      \n
    • bar
    • \n
    \n", + "example": 205, + "start_line": 3464, + "end_line": 3476, + "section": "Block quotes", + "shouldFail": true + }, + { + "markdown": "> foo\n bar\n", + "html": "
    \n
    foo\n
    \n
    \n
    bar\n
    \n", + "example": 206, + "start_line": 3482, + "end_line": 3492, + "section": "Block quotes", + "shouldFail": true + }, + { + "markdown": "> ```\nfoo\n```\n", + "html": "
    \n
    \n
    \n

    foo

    \n
    \n", + "example": 207, + "start_line": 3495, + "end_line": 3505, + "section": "Block quotes", + "shouldFail": true + }, + { + "markdown": "> foo\n - bar\n", + "html": "
    \n

    foo\n- bar

    \n
    \n", + "example": 208, + "start_line": 3511, + "end_line": 3519, + "section": "Block quotes" + }, + { + "markdown": ">\n", + "html": "
    \n
    \n", + "example": 209, + "start_line": 3535, + "end_line": 3540, + "section": "Block quotes" + }, + { + "markdown": ">\n> \n> \n", + "html": "
    \n
    \n", + "example": 210, + "start_line": 3543, + "end_line": 3550, + "section": "Block quotes" + }, + { + "markdown": ">\n> foo\n> \n", + "html": "
    \n

    foo

    \n
    \n", + "example": 211, + "start_line": 3555, + "end_line": 3563, + "section": "Block quotes" + }, + { + "markdown": "> foo\n\n> bar\n", + "html": "
    \n

    foo

    \n
    \n
    \n

    bar

    \n
    \n", + "example": 212, + "start_line": 3568, + "end_line": 3579, + "section": "Block quotes" + }, + { + "markdown": "> foo\n> bar\n", + "html": "
    \n

    foo\nbar

    \n
    \n", + "example": 213, + "start_line": 3590, + "end_line": 3598, + "section": "Block quotes" + }, + { + "markdown": "> foo\n>\n> bar\n", + "html": "
    \n

    foo

    \n

    bar

    \n
    \n", + "example": 214, + "start_line": 3603, + "end_line": 3612, + "section": "Block quotes" + }, + { + "markdown": "foo\n> bar\n", + "html": "

    foo

    \n
    \n

    bar

    \n
    \n", + "example": 215, + "start_line": 3617, + "end_line": 3625, + "section": "Block quotes" + }, + { + "markdown": "> aaa\n***\n> bbb\n", + "html": "
    \n

    aaa

    \n
    \n
    \n
    \n

    bbb

    \n
    \n", + "example": 216, + "start_line": 3631, + "end_line": 3643, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n", + "html": "
    \n

    bar\nbaz

    \n
    \n", + "example": 217, + "start_line": 3649, + "end_line": 3657, + "section": "Block quotes" + }, + { + "markdown": "> bar\n\nbaz\n", + "html": "
    \n

    bar

    \n
    \n

    baz

    \n", + "example": 218, + "start_line": 3660, + "end_line": 3669, + "section": "Block quotes" + }, + { + "markdown": "> bar\n>\nbaz\n", + "html": "
    \n

    bar

    \n
    \n

    baz

    \n", + "example": 219, + "start_line": 3672, + "end_line": 3681, + "section": "Block quotes" + }, + { + "markdown": "> > > foo\nbar\n", + "html": "
    \n
    \n
    \n

    foo\nbar

    \n
    \n
    \n
    \n", + "example": 220, + "start_line": 3688, + "end_line": 3700, + "section": "Block quotes" + }, + { + "markdown": ">>> foo\n> bar\n>>baz\n", + "html": "
    \n
    \n
    \n

    foo\nbar\nbaz

    \n
    \n
    \n
    \n", + "example": 221, + "start_line": 3703, + "end_line": 3717, + "section": "Block quotes" + }, + { + "markdown": "> code\n\n> not code\n", + "html": "
    \n
    code\n
    \n
    \n
    \n

    not code

    \n
    \n", + "example": 222, + "start_line": 3725, + "end_line": 3737, + "section": "Block quotes" + }, + { + "markdown": "A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n", + "html": "

    A paragraph\nwith two lines.

    \n
    indented code\n
    \n
    \n

    A block quote.

    \n
    \n", + "example": 223, + "start_line": 3779, + "end_line": 3794, + "section": "List items" + }, + { + "markdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
      \n
    1. \n

      A paragraph\nwith two lines.

      \n
      indented code\n
      \n
      \n

      A block quote.

      \n
      \n
    2. \n
    \n", + "example": 224, + "start_line": 3801, + "end_line": 3820, + "section": "List items" + }, + { + "markdown": "- one\n\n two\n", + "html": "
      \n
    • one
    • \n
    \n

    two

    \n", + "example": 225, + "start_line": 3834, + "end_line": 3843, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "- one\n\n two\n", + "html": "
      \n
    • \n

      one

      \n

      two

      \n
    • \n
    \n", + "example": 226, + "start_line": 3846, + "end_line": 3857, + "section": "List items" + }, + { + "markdown": " - one\n\n two\n", + "html": "
      \n
    • one
    • \n
    \n
     two\n
    \n", + "example": 227, + "start_line": 3860, + "end_line": 3870, + "section": "List items", + "shouldFail": true + }, + { + "markdown": " - one\n\n two\n", + "html": "
      \n
    • \n

      one

      \n

      two

      \n
    • \n
    \n", + "example": 228, + "start_line": 3873, + "end_line": 3884, + "section": "List items" + }, + { + "markdown": " > > 1. one\n>>\n>> two\n", + "html": "
    \n
    \n
      \n
    1. \n

      one

      \n

      two

      \n
    2. \n
    \n
    \n
    \n", + "example": 229, + "start_line": 3895, + "end_line": 3910, + "section": "List items" + }, + { + "markdown": ">>- one\n>>\n > > two\n", + "html": "
    \n
    \n
      \n
    • one
    • \n
    \n

    two

    \n
    \n
    \n", + "example": 230, + "start_line": 3922, + "end_line": 3935, + "section": "List items" + }, + { + "markdown": "-one\n\n2.two\n", + "html": "

    -one

    \n

    2.two

    \n", + "example": 231, + "start_line": 3941, + "end_line": 3948, + "section": "List items" + }, + { + "markdown": "- foo\n\n\n bar\n", + "html": "
      \n
    • \n

      foo

      \n

      bar

      \n
    • \n
    \n", + "example": 232, + "start_line": 3954, + "end_line": 3966, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam\n", + "html": "
      \n
    1. \n

      foo

      \n
      bar\n
      \n

      baz

      \n
      \n

      bam

      \n
      \n
    2. \n
    \n", + "example": 233, + "start_line": 3971, + "end_line": 3993, + "section": "List items" + }, + { + "markdown": "- Foo\n\n bar\n\n\n baz\n", + "html": "
      \n
    • \n

      Foo

      \n
      bar\n\n\nbaz\n
      \n
    • \n
    \n", + "example": 234, + "start_line": 3999, + "end_line": 4017, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "123456789. ok\n", + "html": "
      \n
    1. ok
    2. \n
    \n", + "example": 235, + "start_line": 4021, + "end_line": 4027, + "section": "List items" + }, + { + "markdown": "1234567890. not ok\n", + "html": "

    1234567890. not ok

    \n", + "example": 236, + "start_line": 4030, + "end_line": 4034, + "section": "List items" + }, + { + "markdown": "0. ok\n", + "html": "
      \n
    1. ok
    2. \n
    \n", + "example": 237, + "start_line": 4039, + "end_line": 4045, + "section": "List items" + }, + { + "markdown": "003. ok\n", + "html": "
      \n
    1. ok
    2. \n
    \n", + "example": 238, + "start_line": 4048, + "end_line": 4054, + "section": "List items" + }, + { + "markdown": "-1. not ok\n", + "html": "

    -1. not ok

    \n", + "example": 239, + "start_line": 4059, + "end_line": 4063, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "
      \n
    • \n

      foo

      \n
      bar\n
      \n
    • \n
    \n", + "example": 240, + "start_line": 4082, + "end_line": 4094, + "section": "List items" + }, + { + "markdown": " 10. foo\n\n bar\n", + "html": "
      \n
    1. \n

      foo

      \n
      bar\n
      \n
    2. \n
    \n", + "example": 241, + "start_line": 4099, + "end_line": 4111, + "section": "List items" + }, + { + "markdown": " indented code\n\nparagraph\n\n more code\n", + "html": "
    indented code\n
    \n

    paragraph

    \n
    more code\n
    \n", + "example": 242, + "start_line": 4118, + "end_line": 4130, + "section": "List items" + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "
      \n
    1. \n
      indented code\n
      \n

      paragraph

      \n
      more code\n
      \n
    2. \n
    \n", + "example": 243, + "start_line": 4133, + "end_line": 4149, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "
      \n
    1. \n
       indented code\n
      \n

      paragraph

      \n
      more code\n
      \n
    2. \n
    \n", + "example": 244, + "start_line": 4155, + "end_line": 4171, + "section": "List items", + "shouldFail": true + }, + { + "markdown": " foo\n\nbar\n", + "html": "

    foo

    \n

    bar

    \n", + "example": 245, + "start_line": 4182, + "end_line": 4189, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "
      \n
    • foo
    • \n
    \n

    bar

    \n", + "example": 246, + "start_line": 4192, + "end_line": 4201, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "- foo\n\n bar\n", + "html": "
      \n
    • \n

      foo

      \n

      bar

      \n
    • \n
    \n", + "example": 247, + "start_line": 4209, + "end_line": 4220, + "section": "List items" + }, + { + "markdown": "-\n foo\n-\n ```\n bar\n ```\n-\n baz\n", + "html": "
      \n
    • foo
    • \n
    • \n
      bar\n
      \n
    • \n
    • \n
      baz\n
      \n
    • \n
    \n", + "example": 248, + "start_line": 4237, + "end_line": 4258, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "- \n foo\n", + "html": "
      \n
    • foo
    • \n
    \n", + "example": 249, + "start_line": 4263, + "end_line": 4270, + "section": "List items" + }, + { + "markdown": "-\n\n foo\n", + "html": "
      \n
    • \n
    \n

    foo

    \n", + "example": 250, + "start_line": 4277, + "end_line": 4286, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "- foo\n-\n- bar\n", + "html": "
      \n
    • foo
    • \n
    • \n
    • bar
    • \n
    \n", + "example": 251, + "start_line": 4291, + "end_line": 4301, + "section": "List items" + }, + { + "markdown": "- foo\n- \n- bar\n", + "html": "
      \n
    • foo
    • \n
    • \n
    • bar
    • \n
    \n", + "example": 252, + "start_line": 4306, + "end_line": 4316, + "section": "List items" + }, + { + "markdown": "1. foo\n2.\n3. bar\n", + "html": "
      \n
    1. foo
    2. \n
    3. \n
    4. bar
    5. \n
    \n", + "example": 253, + "start_line": 4321, + "end_line": 4331, + "section": "List items" + }, + { + "markdown": "*\n", + "html": "
      \n
    • \n
    \n", + "example": 254, + "start_line": 4336, + "end_line": 4342, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "foo\n*\n\nfoo\n1.\n", + "html": "

    foo\n*

    \n

    foo\n1.

    \n", + "example": 255, + "start_line": 4346, + "end_line": 4357, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
      \n
    1. \n

      A paragraph\nwith two lines.

      \n
      indented code\n
      \n
      \n

      A block quote.

      \n
      \n
    2. \n
    \n", + "example": 256, + "start_line": 4368, + "end_line": 4387, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
      \n
    1. \n

      A paragraph\nwith two lines.

      \n
      indented code\n
      \n
      \n

      A block quote.

      \n
      \n
    2. \n
    \n", + "example": 257, + "start_line": 4392, + "end_line": 4411, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
      \n
    1. \n

      A paragraph\nwith two lines.

      \n
      indented code\n
      \n
      \n

      A block quote.

      \n
      \n
    2. \n
    \n", + "example": 258, + "start_line": 4416, + "end_line": 4435, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
    1.  A paragraph\n    with two lines.\n\n        indented code\n\n    > A block quote.\n
    \n", + "example": 259, + "start_line": 4440, + "end_line": 4455, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n", + "html": "
      \n
    1. \n

      A paragraph\nwith two lines.

      \n
      indented code\n
      \n
      \n

      A block quote.

      \n
      \n
    2. \n
    \n", + "example": 260, + "start_line": 4470, + "end_line": 4489, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n", + "html": "
      \n
    1. A paragraph\nwith two lines.
    2. \n
    \n", + "example": 261, + "start_line": 4494, + "end_line": 4502, + "section": "List items" + }, + { + "markdown": "> 1. > Blockquote\ncontinued here.\n", + "html": "
    \n
      \n
    1. \n
      \n

      Blockquote\ncontinued here.

      \n
      \n
    2. \n
    \n
    \n", + "example": 262, + "start_line": 4507, + "end_line": 4521, + "section": "List items" + }, + { + "markdown": "> 1. > Blockquote\n> continued here.\n", + "html": "
    \n
      \n
    1. \n
      \n

      Blockquote\ncontinued here.

      \n
      \n
    2. \n
    \n
    \n", + "example": 263, + "start_line": 4524, + "end_line": 4538, + "section": "List items" + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "html": "
      \n
    • foo\n
        \n
      • bar\n
          \n
        • baz\n
            \n
          • boo
          • \n
          \n
        • \n
        \n
      • \n
      \n
    • \n
    \n", + "example": 264, + "start_line": 4552, + "end_line": 4573, + "section": "List items" + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "html": "
      \n
    • foo
    • \n
    • bar
    • \n
    • baz
    • \n
    • boo
    • \n
    \n", + "example": 265, + "start_line": 4578, + "end_line": 4590, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "10) foo\n - bar\n", + "html": "
      \n
    1. foo\n
        \n
      • bar
      • \n
      \n
    2. \n
    \n", + "example": 266, + "start_line": 4595, + "end_line": 4606, + "section": "List items" + }, + { + "markdown": "10) foo\n - bar\n", + "html": "
      \n
    1. foo
    2. \n
    \n
      \n
    • bar
    • \n
    \n", + "example": 267, + "start_line": 4611, + "end_line": 4621, + "section": "List items", + "shouldFail": true + }, + { + "markdown": "- - foo\n", + "html": "
      \n
    • \n
        \n
      • foo
      • \n
      \n
    • \n
    \n", + "example": 268, + "start_line": 4626, + "end_line": 4636, + "section": "List items" + }, + { + "markdown": "1. - 2. foo\n", + "html": "
      \n
    1. \n
        \n
      • \n
          \n
        1. foo
        2. \n
        \n
      • \n
      \n
    2. \n
    \n", + "example": 269, + "start_line": 4639, + "end_line": 4653, + "section": "List items" + }, + { + "markdown": "- # Foo\n- Bar\n ---\n baz\n", + "html": "
      \n
    • \n

      Foo

      \n
    • \n
    • \n

      Bar

      \nbaz
    • \n
    \n", + "example": 270, + "start_line": 4658, + "end_line": 4672, + "section": "List items" + }, + { + "markdown": "- foo\n- bar\n+ baz\n", + "html": "
      \n
    • foo
    • \n
    • bar
    • \n
    \n
      \n
    • baz
    • \n
    \n", + "example": 271, + "start_line": 4894, + "end_line": 4906, + "section": "Lists" + }, + { + "markdown": "1. foo\n2. bar\n3) baz\n", + "html": "
      \n
    1. foo
    2. \n
    3. bar
    4. \n
    \n
      \n
    1. baz
    2. \n
    \n", + "example": 272, + "start_line": 4909, + "end_line": 4921, + "section": "Lists" + }, + { + "markdown": "Foo\n- bar\n- baz\n", + "html": "

    Foo

    \n
      \n
    • bar
    • \n
    • baz
    • \n
    \n", + "example": 273, + "start_line": 4928, + "end_line": 4938, + "section": "Lists" + }, + { + "markdown": "The number of windows in my house is\n14. The number of doors is 6.\n", + "html": "

    The number of windows in my house is\n14. The number of doors is 6.

    \n", + "example": 274, + "start_line": 5005, + "end_line": 5011, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "The number of windows in my house is\n1. The number of doors is 6.\n", + "html": "

    The number of windows in my house is

    \n
      \n
    1. The number of doors is 6.
    2. \n
    \n", + "example": 275, + "start_line": 5015, + "end_line": 5023, + "section": "Lists" + }, + { + "markdown": "- foo\n\n- bar\n\n\n- baz\n", + "html": "
      \n
    • \n

      foo

      \n
    • \n
    • \n

      bar

      \n
    • \n
    • \n

      baz

      \n
    • \n
    \n", + "example": 276, + "start_line": 5029, + "end_line": 5048, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- foo\n - bar\n - baz\n\n\n bim\n", + "html": "
      \n
    • foo\n
        \n
      • bar\n
          \n
        • \n

          baz

          \n

          bim

          \n
        • \n
        \n
      • \n
      \n
    • \n
    \n", + "example": 277, + "start_line": 5050, + "end_line": 5072, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- foo\n- bar\n\n\n\n- baz\n- bim\n", + "html": "
      \n
    • foo
    • \n
    • bar
    • \n
    \n\n
      \n
    • baz
    • \n
    • bim
    • \n
    \n", + "example": 278, + "start_line": 5080, + "end_line": 5098, + "section": "Lists" + }, + { + "markdown": "- foo\n\n notcode\n\n- foo\n\n\n\n code\n", + "html": "
      \n
    • \n

      foo

      \n

      notcode

      \n
    • \n
    • \n

      foo

      \n
    • \n
    \n\n
    code\n
    \n", + "example": 279, + "start_line": 5101, + "end_line": 5124, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n - f\n- g\n", + "html": "
      \n
    • a
    • \n
    • b
    • \n
    • c
    • \n
    • d
    • \n
    • e
    • \n
    • f
    • \n
    • g
    • \n
    \n", + "example": 280, + "start_line": 5132, + "end_line": 5150, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "html": "
      \n
    1. \n

      a

      \n
    2. \n
    3. \n

      b

      \n
    4. \n
    5. \n

      c

      \n
    6. \n
    \n", + "example": 281, + "start_line": 5153, + "end_line": 5171, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n", + "html": "
      \n
    • a
    • \n
    • b
    • \n
    • c
    • \n
    • d\n- e
    • \n
    \n", + "example": 282, + "start_line": 5177, + "end_line": 5191, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "html": "
      \n
    1. \n

      a

      \n
    2. \n
    3. \n

      b

      \n
    4. \n
    \n
    3. c\n
    \n", + "example": 283, + "start_line": 5197, + "end_line": 5214, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- a\n- b\n\n- c\n", + "html": "
      \n
    • \n

      a

      \n
    • \n
    • \n

      b

      \n
    • \n
    • \n

      c

      \n
    • \n
    \n", + "example": 284, + "start_line": 5220, + "end_line": 5237, + "section": "Lists" + }, + { + "markdown": "* a\n*\n\n* c\n", + "html": "
      \n
    • \n

      a

      \n
    • \n
    • \n
    • \n

      c

      \n
    • \n
    \n", + "example": 285, + "start_line": 5242, + "end_line": 5257, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- a\n- b\n\n c\n- d\n", + "html": "
      \n
    • \n

      a

      \n
    • \n
    • \n

      b

      \n

      c

      \n
    • \n
    • \n

      d

      \n
    • \n
    \n", + "example": 286, + "start_line": 5264, + "end_line": 5283, + "section": "Lists" + }, + { + "markdown": "- a\n- b\n\n [ref]: /url\n- d\n", + "html": "
      \n
    • \n

      a

      \n
    • \n
    • \n

      b

      \n
    • \n
    • \n

      d

      \n
    • \n
    \n", + "example": 287, + "start_line": 5286, + "end_line": 5304, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- a\n- ```\n b\n\n\n ```\n- c\n", + "html": "
      \n
    • a
    • \n
    • \n
      b\n\n\n
      \n
    • \n
    • c
    • \n
    \n", + "example": 288, + "start_line": 5309, + "end_line": 5328, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- a\n - b\n\n c\n- d\n", + "html": "
      \n
    • a\n
        \n
      • \n

        b

        \n

        c

        \n
      • \n
      \n
    • \n
    • d
    • \n
    \n", + "example": 289, + "start_line": 5335, + "end_line": 5353, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "* a\n > b\n >\n* c\n", + "html": "
      \n
    • a\n
      \n

      b

      \n
      \n
    • \n
    • c
    • \n
    \n", + "example": 290, + "start_line": 5359, + "end_line": 5373, + "section": "Lists" + }, + { + "markdown": "- a\n > b\n ```\n c\n ```\n- d\n", + "html": "
      \n
    • a\n
      \n

      b

      \n
      \n
      c\n
      \n
    • \n
    • d
    • \n
    \n", + "example": 291, + "start_line": 5379, + "end_line": 5397, + "section": "Lists", + "shouldFail": true + }, + { + "markdown": "- a\n", + "html": "
      \n
    • a
    • \n
    \n", + "example": 292, + "start_line": 5402, + "end_line": 5408, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n", + "html": "
      \n
    • a\n
        \n
      • b
      • \n
      \n
    • \n
    \n", + "example": 293, + "start_line": 5411, + "end_line": 5422, + "section": "Lists" + }, + { + "markdown": "1. ```\n foo\n ```\n\n bar\n", + "html": "
      \n
    1. \n
      foo\n
      \n

      bar

      \n
    2. \n
    \n", + "example": 294, + "start_line": 5428, + "end_line": 5442, + "section": "Lists" + }, + { + "markdown": "* foo\n * bar\n\n baz\n", + "html": "
      \n
    • \n

      foo

      \n
        \n
      • bar
      • \n
      \n

      baz

      \n
    • \n
    \n", + "example": 295, + "start_line": 5447, + "end_line": 5462, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n\n- d\n - e\n - f\n", + "html": "
      \n
    • \n

      a

      \n
        \n
      • b
      • \n
      • c
      • \n
      \n
    • \n
    • \n

      d

      \n
        \n
      • e
      • \n
      • f
      • \n
      \n
    • \n
    \n", + "example": 296, + "start_line": 5465, + "end_line": 5490, + "section": "Lists" + }, + { + "markdown": "`hi`lo`\n", + "html": "

    hilo`

    \n", + "example": 297, + "start_line": 5499, + "end_line": 5503, + "section": "Inlines" + }, + { + "markdown": "\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~\n", + "html": "

    !"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~

    \n", + "example": 298, + "start_line": 5513, + "end_line": 5517, + "section": "Backslash escapes" + }, + { + "markdown": "\\\t\\A\\a\\ \\3\\φ\\«\n", + "html": "

    \\\t\\A\\a\\ \\3\\φ\\«

    \n", + "example": 299, + "start_line": 5523, + "end_line": 5527, + "section": "Backslash escapes" + }, + { + "markdown": "\\*not emphasized*\n\\
    not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n\\ö not a character entity\n", + "html": "

    *not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"\n&ouml; not a character entity

    \n", + "example": 300, + "start_line": 5533, + "end_line": 5553, + "section": "Backslash escapes" + }, + { + "markdown": "\\\\*emphasis*\n", + "html": "

    \\emphasis

    \n", + "example": 301, + "start_line": 5558, + "end_line": 5562, + "section": "Backslash escapes" + }, + { + "markdown": "foo\\\nbar\n", + "html": "

    foo
    \nbar

    \n", + "example": 302, + "start_line": 5567, + "end_line": 5573, + "section": "Backslash escapes" + }, + { + "markdown": "`` \\[\\` ``\n", + "html": "

    \\[\\`

    \n", + "example": 303, + "start_line": 5579, + "end_line": 5583, + "section": "Backslash escapes" + }, + { + "markdown": " \\[\\]\n", + "html": "
    \\[\\]\n
    \n", + "example": 304, + "start_line": 5586, + "end_line": 5591, + "section": "Backslash escapes" + }, + { + "markdown": "~~~\n\\[\\]\n~~~\n", + "html": "
    \\[\\]\n
    \n", + "example": 305, + "start_line": 5594, + "end_line": 5601, + "section": "Backslash escapes" + }, + { + "markdown": "\n", + "html": "

    http://example.com?find=\\*

    \n", + "example": 306, + "start_line": 5604, + "end_line": 5608, + "section": "Backslash escapes" + }, + { + "markdown": "\n", + "html": "\n", + "example": 307, + "start_line": 5611, + "end_line": 5615, + "section": "Backslash escapes" + }, + { + "markdown": "[foo](/bar\\* \"ti\\*tle\")\n", + "html": "

    foo

    \n", + "example": 308, + "start_line": 5621, + "end_line": 5625, + "section": "Backslash escapes" + }, + { + "markdown": "[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"\n", + "html": "

    foo

    \n", + "example": 309, + "start_line": 5628, + "end_line": 5634, + "section": "Backslash escapes", + "shouldFail": true + }, + { + "markdown": "``` foo\\+bar\nfoo\n```\n", + "html": "
    foo\n
    \n", + "example": 310, + "start_line": 5637, + "end_line": 5644, + "section": "Backslash escapes" + }, + { + "markdown": "  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸\n", + "html": "

      & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸

    \n", + "example": 311, + "start_line": 5674, + "end_line": 5682, + "section": "Entity and numeric character references" + }, + { + "markdown": "# Ӓ Ϡ �\n", + "html": "

    # Ӓ Ϡ �

    \n", + "example": 312, + "start_line": 5693, + "end_line": 5697, + "section": "Entity and numeric character references" + }, + { + "markdown": "" ആ ಫ\n", + "html": "

    " ആ ಫ

    \n", + "example": 313, + "start_line": 5706, + "end_line": 5710, + "section": "Entity and numeric character references" + }, + { + "markdown": "  &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?;\n", + "html": "

    &nbsp &x; &#; &#x;\n&#987654321;\n&#abcdef0;\n&ThisIsNotDefined; &hi?;

    \n", + "example": 314, + "start_line": 5715, + "end_line": 5725, + "section": "Entity and numeric character references", + "shouldFail": true + }, + { + "markdown": "©\n", + "html": "

    &copy

    \n", + "example": 315, + "start_line": 5732, + "end_line": 5736, + "section": "Entity and numeric character references" + }, + { + "markdown": "&MadeUpEntity;\n", + "html": "

    &MadeUpEntity;

    \n", + "example": 316, + "start_line": 5742, + "end_line": 5746, + "section": "Entity and numeric character references" + }, + { + "markdown": "\n", + "html": "\n", + "example": 317, + "start_line": 5753, + "end_line": 5757, + "section": "Entity and numeric character references" + }, + { + "markdown": "[foo](/föö \"föö\")\n", + "html": "

    foo

    \n", + "example": 318, + "start_line": 5760, + "end_line": 5764, + "section": "Entity and numeric character references", + "shouldFail": true + }, + { + "markdown": "[foo]\n\n[foo]: /föö \"föö\"\n", + "html": "

    foo

    \n", + "example": 319, + "start_line": 5767, + "end_line": 5773, + "section": "Entity and numeric character references", + "shouldFail": true + }, + { + "markdown": "``` föö\nfoo\n```\n", + "html": "
    foo\n
    \n", + "example": 320, + "start_line": 5776, + "end_line": 5783, + "section": "Entity and numeric character references" + }, + { + "markdown": "`föö`\n", + "html": "

    f&ouml;&ouml;

    \n", + "example": 321, + "start_line": 5789, + "end_line": 5793, + "section": "Entity and numeric character references" + }, + { + "markdown": " föfö\n", + "html": "
    f&ouml;f&ouml;\n
    \n", + "example": 322, + "start_line": 5796, + "end_line": 5801, + "section": "Entity and numeric character references" + }, + { + "markdown": "*foo*\n*foo*\n", + "html": "

    *foo*\nfoo

    \n", + "example": 323, + "start_line": 5808, + "end_line": 5814, + "section": "Entity and numeric character references" + }, + { + "markdown": "* foo\n\n* foo\n", + "html": "

    * foo

    \n
      \n
    • foo
    • \n
    \n", + "example": 324, + "start_line": 5816, + "end_line": 5825, + "section": "Entity and numeric character references" + }, + { + "markdown": "foo bar\n", + "html": "

    foo\n\nbar

    \n", + "example": 325, + "start_line": 5827, + "end_line": 5833, + "section": "Entity and numeric character references" + }, + { + "markdown": " foo\n", + "html": "

    \tfoo

    \n", + "example": 326, + "start_line": 5835, + "end_line": 5839, + "section": "Entity and numeric character references" + }, + { + "markdown": "[a](url "tit")\n", + "html": "

    [a](url "tit")

    \n", + "example": 327, + "start_line": 5842, + "end_line": 5846, + "section": "Entity and numeric character references" + }, + { + "markdown": "`foo`\n", + "html": "

    foo

    \n", + "example": 328, + "start_line": 5870, + "end_line": 5874, + "section": "Code spans" + }, + { + "markdown": "`` foo ` bar ``\n", + "html": "

    foo ` bar

    \n", + "example": 329, + "start_line": 5881, + "end_line": 5885, + "section": "Code spans" + }, + { + "markdown": "` `` `\n", + "html": "

    ``

    \n", + "example": 330, + "start_line": 5891, + "end_line": 5895, + "section": "Code spans" + }, + { + "markdown": "` `` `\n", + "html": "

    ``

    \n", + "example": 331, + "start_line": 5899, + "end_line": 5903, + "section": "Code spans" + }, + { + "markdown": "` a`\n", + "html": "

    a

    \n", + "example": 332, + "start_line": 5908, + "end_line": 5912, + "section": "Code spans" + }, + { + "markdown": "` b `\n", + "html": "

     b 

    \n", + "example": 333, + "start_line": 5917, + "end_line": 5921, + "section": "Code spans" + }, + { + "markdown": "` `\n` `\n", + "html": "

     \n

    \n", + "example": 334, + "start_line": 5925, + "end_line": 5931, + "section": "Code spans" + }, + { + "markdown": "``\nfoo\nbar \nbaz\n``\n", + "html": "

    foo bar baz

    \n", + "example": 335, + "start_line": 5936, + "end_line": 5944, + "section": "Code spans" + }, + { + "markdown": "``\nfoo \n``\n", + "html": "

    foo

    \n", + "example": 336, + "start_line": 5946, + "end_line": 5952, + "section": "Code spans" + }, + { + "markdown": "`foo bar \nbaz`\n", + "html": "

    foo bar baz

    \n", + "example": 337, + "start_line": 5957, + "end_line": 5962, + "section": "Code spans" + }, + { + "markdown": "`foo\\`bar`\n", + "html": "

    foo\\bar`

    \n", + "example": 338, + "start_line": 5974, + "end_line": 5978, + "section": "Code spans" + }, + { + "markdown": "``foo`bar``\n", + "html": "

    foo`bar

    \n", + "example": 339, + "start_line": 5985, + "end_line": 5989, + "section": "Code spans" + }, + { + "markdown": "` foo `` bar `\n", + "html": "

    foo `` bar

    \n", + "example": 340, + "start_line": 5991, + "end_line": 5995, + "section": "Code spans" + }, + { + "markdown": "*foo`*`\n", + "html": "

    *foo*

    \n", + "example": 341, + "start_line": 6003, + "end_line": 6007, + "section": "Code spans", + "shouldFail": true + }, + { + "markdown": "[not a `link](/foo`)\n", + "html": "

    [not a link](/foo)

    \n", + "example": 342, + "start_line": 6012, + "end_line": 6016, + "section": "Code spans", + "shouldFail": true + }, + { + "markdown": "``\n", + "html": "

    <a href="">`

    \n", + "example": 343, + "start_line": 6022, + "end_line": 6026, + "section": "Code spans" + }, + { + "markdown": "
    `\n", + "html": "

    `

    \n", + "example": 344, + "start_line": 6031, + "end_line": 6035, + "section": "Code spans" + }, + { + "markdown": "``\n", + "html": "

    <http://foo.bar.baz>`

    \n", + "example": 345, + "start_line": 6040, + "end_line": 6044, + "section": "Code spans" + }, + { + "markdown": "`\n", + "html": "

    http://foo.bar.`baz`

    \n", + "example": 346, + "start_line": 6049, + "end_line": 6053, + "section": "Code spans" + }, + { + "markdown": "```foo``\n", + "html": "

    ```foo``

    \n", + "example": 347, + "start_line": 6059, + "end_line": 6063, + "section": "Code spans" + }, + { + "markdown": "`foo\n", + "html": "

    `foo

    \n", + "example": 348, + "start_line": 6066, + "end_line": 6070, + "section": "Code spans" + }, + { + "markdown": "`foo``bar``\n", + "html": "

    `foobar

    \n", + "example": 349, + "start_line": 6075, + "end_line": 6079, + "section": "Code spans" + }, + { + "markdown": "*foo bar*\n", + "html": "

    foo bar

    \n", + "example": 350, + "start_line": 6292, + "end_line": 6296, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a * foo bar*\n", + "html": "

    a * foo bar*

    \n", + "example": 351, + "start_line": 6302, + "end_line": 6306, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a*\"foo\"*\n", + "html": "

    a*"foo"*

    \n", + "example": 352, + "start_line": 6313, + "end_line": 6317, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "* a *\n", + "html": "

    * a *

    \n", + "example": 353, + "start_line": 6322, + "end_line": 6326, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "foo*bar*\n", + "html": "

    foobar

    \n", + "example": 354, + "start_line": 6331, + "end_line": 6335, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5*6*78\n", + "html": "

    5678

    \n", + "example": 355, + "start_line": 6338, + "end_line": 6342, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar_\n", + "html": "

    foo bar

    \n", + "example": 356, + "start_line": 6347, + "end_line": 6351, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_ foo bar_\n", + "html": "

    _ foo bar_

    \n", + "example": 357, + "start_line": 6357, + "end_line": 6361, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a_\"foo\"_\n", + "html": "

    a_"foo"_

    \n", + "example": 358, + "start_line": 6367, + "end_line": 6371, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo_bar_\n", + "html": "

    foo_bar_

    \n", + "example": 359, + "start_line": 6376, + "end_line": 6380, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5_6_78\n", + "html": "

    5_6_78

    \n", + "example": 360, + "start_line": 6383, + "end_line": 6387, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням_стремятся_\n", + "html": "

    пристаням_стремятся_

    \n", + "example": 361, + "start_line": 6390, + "end_line": 6394, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "aa_\"bb\"_cc\n", + "html": "

    aa_"bb"_cc

    \n", + "example": 362, + "start_line": 6400, + "end_line": 6404, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo-_(bar)_\n", + "html": "

    foo-(bar)

    \n", + "example": 363, + "start_line": 6411, + "end_line": 6415, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo*\n", + "html": "

    _foo*

    \n", + "example": 364, + "start_line": 6423, + "end_line": 6427, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar *\n", + "html": "

    *foo bar *

    \n", + "example": 365, + "start_line": 6433, + "end_line": 6437, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar\n*\n", + "html": "

    *foo bar\n*

    \n", + "example": 366, + "start_line": 6442, + "end_line": 6448, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(*foo)\n", + "html": "

    *(*foo)

    \n", + "example": 367, + "start_line": 6455, + "end_line": 6459, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*(*foo*)*\n", + "html": "

    (foo)

    \n", + "example": 368, + "start_line": 6465, + "end_line": 6469, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo*bar\n", + "html": "

    foobar

    \n", + "example": 369, + "start_line": 6474, + "end_line": 6478, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar _\n", + "html": "

    _foo bar _

    \n", + "example": 370, + "start_line": 6487, + "end_line": 6491, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(_foo)\n", + "html": "

    _(_foo)

    \n", + "example": 371, + "start_line": 6497, + "end_line": 6501, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "_(_foo_)_\n", + "html": "

    (foo)

    \n", + "example": 372, + "start_line": 6506, + "end_line": 6510, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "_foo_bar\n", + "html": "

    _foo_bar

    \n", + "example": 373, + "start_line": 6515, + "end_line": 6519, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_пристаням_стремятся\n", + "html": "

    _пристаням_стремятся

    \n", + "example": 374, + "start_line": 6522, + "end_line": 6526, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo_bar_baz_\n", + "html": "

    foo_bar_baz

    \n", + "example": 375, + "start_line": 6529, + "end_line": 6533, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(bar)_.\n", + "html": "

    (bar).

    \n", + "example": 376, + "start_line": 6540, + "end_line": 6544, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar**\n", + "html": "

    foo bar

    \n", + "example": 377, + "start_line": 6549, + "end_line": 6553, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "** foo bar**\n", + "html": "

    ** foo bar**

    \n", + "example": 378, + "start_line": 6559, + "end_line": 6563, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a**\"foo\"**\n", + "html": "

    a**"foo"**

    \n", + "example": 379, + "start_line": 6570, + "end_line": 6574, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "foo**bar**\n", + "html": "

    foobar

    \n", + "example": 380, + "start_line": 6579, + "end_line": 6583, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar__\n", + "html": "

    foo bar

    \n", + "example": 381, + "start_line": 6588, + "end_line": 6592, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ foo bar__\n", + "html": "

    __ foo bar__

    \n", + "example": 382, + "start_line": 6598, + "end_line": 6602, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__\nfoo bar__\n", + "html": "

    __\nfoo bar__

    \n", + "example": 383, + "start_line": 6606, + "end_line": 6612, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a__\"foo\"__\n", + "html": "

    a__"foo"__

    \n", + "example": 384, + "start_line": 6618, + "end_line": 6622, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo__bar__\n", + "html": "

    foo__bar__

    \n", + "example": 385, + "start_line": 6627, + "end_line": 6631, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5__6__78\n", + "html": "

    5__6__78

    \n", + "example": 386, + "start_line": 6634, + "end_line": 6638, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням__стремятся__\n", + "html": "

    пристаням__стремятся__

    \n", + "example": 387, + "start_line": 6641, + "end_line": 6645, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__foo, __bar__, baz__\n", + "html": "

    foo, bar, baz

    \n", + "example": 388, + "start_line": 6648, + "end_line": 6652, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "foo-__(bar)__\n", + "html": "

    foo-(bar)

    \n", + "example": 389, + "start_line": 6659, + "end_line": 6663, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar **\n", + "html": "

    **foo bar **

    \n", + "example": 390, + "start_line": 6672, + "end_line": 6676, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "**(**foo)\n", + "html": "

    **(**foo)

    \n", + "example": 391, + "start_line": 6685, + "end_line": 6689, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*(**foo**)*\n", + "html": "

    (foo)

    \n", + "example": 392, + "start_line": 6695, + "end_line": 6699, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**\n", + "html": "

    Gomphocarpus (Gomphocarpus physocarpus, syn.\nAsclepias physocarpa)

    \n", + "example": 393, + "start_line": 6702, + "end_line": 6708, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo \"*bar*\" foo**\n", + "html": "

    foo "bar" foo

    \n", + "example": 394, + "start_line": 6711, + "end_line": 6715, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo**bar\n", + "html": "

    foobar

    \n", + "example": 395, + "start_line": 6720, + "end_line": 6724, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar __\n", + "html": "

    __foo bar __

    \n", + "example": 396, + "start_line": 6732, + "end_line": 6736, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__(__foo)\n", + "html": "

    __(__foo)

    \n", + "example": 397, + "start_line": 6742, + "end_line": 6746, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "_(__foo__)_\n", + "html": "

    (foo)

    \n", + "example": 398, + "start_line": 6752, + "end_line": 6756, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__bar\n", + "html": "

    __foo__bar

    \n", + "example": 399, + "start_line": 6761, + "end_line": 6765, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__пристаням__стремятся\n", + "html": "

    __пристаням__стремятся

    \n", + "example": 400, + "start_line": 6768, + "end_line": 6772, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__foo__bar__baz__\n", + "html": "

    foo__bar__baz

    \n", + "example": 401, + "start_line": 6775, + "end_line": 6779, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__(bar)__.\n", + "html": "

    (bar).

    \n", + "example": 402, + "start_line": 6786, + "end_line": 6790, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo [bar](/url)*\n", + "html": "

    foo bar

    \n", + "example": 403, + "start_line": 6798, + "end_line": 6802, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo\nbar*\n", + "html": "

    foo\nbar

    \n", + "example": 404, + "start_line": 6805, + "end_line": 6811, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo __bar__ baz_\n", + "html": "

    foo bar baz

    \n", + "example": 405, + "start_line": 6817, + "end_line": 6821, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo _bar_ baz_\n", + "html": "

    foo bar baz

    \n", + "example": 406, + "start_line": 6824, + "end_line": 6828, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__foo_ bar_\n", + "html": "

    foo bar

    \n", + "example": 407, + "start_line": 6831, + "end_line": 6835, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo *bar**\n", + "html": "

    foo bar

    \n", + "example": 408, + "start_line": 6838, + "end_line": 6842, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar** baz*\n", + "html": "

    foo bar baz

    \n", + "example": 409, + "start_line": 6845, + "end_line": 6849, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar**baz*\n", + "html": "

    foobarbaz

    \n", + "example": 410, + "start_line": 6851, + "end_line": 6855, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar*\n", + "html": "

    foo**bar

    \n", + "example": 411, + "start_line": 6875, + "end_line": 6879, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo** bar*\n", + "html": "

    foo bar

    \n", + "example": 412, + "start_line": 6888, + "end_line": 6892, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo **bar***\n", + "html": "

    foo bar

    \n", + "example": 413, + "start_line": 6895, + "end_line": 6899, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo**bar***\n", + "html": "

    foobar

    \n", + "example": 414, + "start_line": 6902, + "end_line": 6906, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "foo***bar***baz\n", + "html": "

    foobarbaz

    \n", + "example": 415, + "start_line": 6913, + "end_line": 6917, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "foo******bar*********baz\n", + "html": "

    foobar***baz

    \n", + "example": 416, + "start_line": 6919, + "end_line": 6923, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo **bar *baz* bim** bop*\n", + "html": "

    foo bar baz bim bop

    \n", + "example": 417, + "start_line": 6928, + "end_line": 6932, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo [*bar*](/url)*\n", + "html": "

    foo bar

    \n", + "example": 418, + "start_line": 6935, + "end_line": 6939, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "** is not an empty emphasis\n", + "html": "

    ** is not an empty emphasis

    \n", + "example": 419, + "start_line": 6944, + "end_line": 6948, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**** is not an empty strong emphasis\n", + "html": "

    **** is not an empty strong emphasis

    \n", + "example": 420, + "start_line": 6951, + "end_line": 6955, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo [bar](/url)**\n", + "html": "

    foo bar

    \n", + "example": 421, + "start_line": 6964, + "end_line": 6968, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo\nbar**\n", + "html": "

    foo\nbar

    \n", + "example": 422, + "start_line": 6971, + "end_line": 6977, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo _bar_ baz__\n", + "html": "

    foo bar baz

    \n", + "example": 423, + "start_line": 6983, + "end_line": 6987, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo __bar__ baz__\n", + "html": "

    foo bar baz

    \n", + "example": 424, + "start_line": 6990, + "end_line": 6994, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "____foo__ bar__\n", + "html": "

    foo bar

    \n", + "example": 425, + "start_line": 6997, + "end_line": 7001, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "**foo **bar****\n", + "html": "

    foo bar

    \n", + "example": 426, + "start_line": 7004, + "end_line": 7008, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar* baz**\n", + "html": "

    foo bar baz

    \n", + "example": 427, + "start_line": 7011, + "end_line": 7015, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*bar*baz**\n", + "html": "

    foobarbaz

    \n", + "example": 428, + "start_line": 7018, + "end_line": 7022, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo* bar**\n", + "html": "

    foo bar

    \n", + "example": 429, + "start_line": 7025, + "end_line": 7029, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar***\n", + "html": "

    foo bar

    \n", + "example": 430, + "start_line": 7032, + "end_line": 7036, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar **baz**\nbim* bop**\n", + "html": "

    foo bar baz\nbim bop

    \n", + "example": 431, + "start_line": 7041, + "end_line": 7047, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "**foo [*bar*](/url)**\n", + "html": "

    foo bar

    \n", + "example": 432, + "start_line": 7050, + "end_line": 7054, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ is not an empty emphasis\n", + "html": "

    __ is not an empty emphasis

    \n", + "example": 433, + "start_line": 7059, + "end_line": 7063, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____ is not an empty strong emphasis\n", + "html": "

    ____ is not an empty strong emphasis

    \n", + "example": 434, + "start_line": 7066, + "end_line": 7070, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo ***\n", + "html": "

    foo ***

    \n", + "example": 435, + "start_line": 7076, + "end_line": 7080, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *\\**\n", + "html": "

    foo *

    \n", + "example": 436, + "start_line": 7083, + "end_line": 7087, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *_*\n", + "html": "

    foo _

    \n", + "example": 437, + "start_line": 7090, + "end_line": 7094, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *****\n", + "html": "

    foo *****

    \n", + "example": 438, + "start_line": 7097, + "end_line": 7101, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **\\***\n", + "html": "

    foo *

    \n", + "example": 439, + "start_line": 7104, + "end_line": 7108, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **_**\n", + "html": "

    foo _

    \n", + "example": 440, + "start_line": 7111, + "end_line": 7115, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*\n", + "html": "

    *foo

    \n", + "example": 441, + "start_line": 7122, + "end_line": 7126, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo**\n", + "html": "

    foo*

    \n", + "example": 442, + "start_line": 7129, + "end_line": 7133, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "***foo**\n", + "html": "

    *foo

    \n", + "example": 443, + "start_line": 7136, + "end_line": 7140, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "****foo*\n", + "html": "

    ***foo

    \n", + "example": 444, + "start_line": 7143, + "end_line": 7147, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "**foo***\n", + "html": "

    foo*

    \n", + "example": 445, + "start_line": 7150, + "end_line": 7154, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo****\n", + "html": "

    foo***

    \n", + "example": 446, + "start_line": 7157, + "end_line": 7161, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "foo ___\n", + "html": "

    foo ___

    \n", + "example": 447, + "start_line": 7167, + "end_line": 7171, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _\\__\n", + "html": "

    foo _

    \n", + "example": 448, + "start_line": 7174, + "end_line": 7178, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _*_\n", + "html": "

    foo *

    \n", + "example": 449, + "start_line": 7181, + "end_line": 7185, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _____\n", + "html": "

    foo _____

    \n", + "example": 450, + "start_line": 7188, + "end_line": 7192, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __\\___\n", + "html": "

    foo _

    \n", + "example": 451, + "start_line": 7195, + "end_line": 7199, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __*__\n", + "html": "

    foo *

    \n", + "example": 452, + "start_line": 7202, + "end_line": 7206, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo_\n", + "html": "

    _foo

    \n", + "example": 453, + "start_line": 7209, + "end_line": 7213, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "_foo__\n", + "html": "

    foo_

    \n", + "example": 454, + "start_line": 7220, + "end_line": 7224, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "___foo__\n", + "html": "

    _foo

    \n", + "example": 455, + "start_line": 7227, + "end_line": 7231, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "____foo_\n", + "html": "

    ___foo

    \n", + "example": 456, + "start_line": 7234, + "end_line": 7238, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__foo___\n", + "html": "

    foo_

    \n", + "example": 457, + "start_line": 7241, + "end_line": 7245, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "_foo____\n", + "html": "

    foo___

    \n", + "example": 458, + "start_line": 7248, + "end_line": 7252, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "**foo**\n", + "html": "

    foo

    \n", + "example": 459, + "start_line": 7258, + "end_line": 7262, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*_foo_*\n", + "html": "

    foo

    \n", + "example": 460, + "start_line": 7265, + "end_line": 7269, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__\n", + "html": "

    foo

    \n", + "example": 461, + "start_line": 7272, + "end_line": 7276, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_*foo*_\n", + "html": "

    foo

    \n", + "example": 462, + "start_line": 7279, + "end_line": 7283, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "****foo****\n", + "html": "

    foo

    \n", + "example": 463, + "start_line": 7289, + "end_line": 7293, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo____\n", + "html": "

    foo

    \n", + "example": 464, + "start_line": 7296, + "end_line": 7300, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "******foo******\n", + "html": "

    foo

    \n", + "example": 465, + "start_line": 7307, + "end_line": 7311, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "***foo***\n", + "html": "

    foo

    \n", + "example": 466, + "start_line": 7316, + "end_line": 7320, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "_____foo_____\n", + "html": "

    foo

    \n", + "example": 467, + "start_line": 7323, + "end_line": 7327, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo _bar* baz_\n", + "html": "

    foo _bar baz_

    \n", + "example": 468, + "start_line": 7332, + "end_line": 7336, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo __bar *baz bim__ bam*\n", + "html": "

    foo bar *baz bim bam

    \n", + "example": 469, + "start_line": 7339, + "end_line": 7343, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo **bar baz**\n", + "html": "

    **foo bar baz

    \n", + "example": 470, + "start_line": 7348, + "end_line": 7352, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*foo *bar baz*\n", + "html": "

    *foo bar baz

    \n", + "example": 471, + "start_line": 7355, + "end_line": 7359, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*[bar*](/url)\n", + "html": "

    *bar*

    \n", + "example": 472, + "start_line": 7364, + "end_line": 7368, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo [bar_](/url)\n", + "html": "

    _foo bar_

    \n", + "example": 473, + "start_line": 7371, + "end_line": 7375, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*\n", + "html": "

    *

    \n", + "example": 474, + "start_line": 7378, + "end_line": 7382, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**\n", + "html": "

    **

    \n", + "example": 475, + "start_line": 7385, + "end_line": 7389, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__\n", + "html": "

    __

    \n", + "example": 476, + "start_line": 7392, + "end_line": 7396, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "*a `*`*\n", + "html": "

    a *

    \n", + "example": 477, + "start_line": 7399, + "end_line": 7403, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "_a `_`_\n", + "html": "

    a _

    \n", + "example": 478, + "start_line": 7406, + "end_line": 7410, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**a\n", + "html": "

    **ahttp://foo.bar/?q=**

    \n", + "example": 479, + "start_line": 7413, + "end_line": 7417, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "__a\n", + "html": "

    __ahttp://foo.bar/?q=__

    \n", + "example": 480, + "start_line": 7420, + "end_line": 7424, + "section": "Emphasis and strong emphasis", + "shouldFail": true + }, + { + "markdown": "[link](/uri \"title\")\n", + "html": "

    link

    \n", + "example": 481, + "start_line": 7503, + "end_line": 7507, + "section": "Links" + }, + { + "markdown": "[link](/uri)\n", + "html": "

    link

    \n", + "example": 482, + "start_line": 7512, + "end_line": 7516, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "

    link

    \n", + "example": 483, + "start_line": 7521, + "end_line": 7525, + "section": "Links" + }, + { + "markdown": "[link](<>)\n", + "html": "

    link

    \n", + "example": 484, + "start_line": 7528, + "end_line": 7532, + "section": "Links" + }, + { + "markdown": "[link](/my uri)\n", + "html": "

    [link](/my uri)

    \n", + "example": 485, + "start_line": 7537, + "end_line": 7541, + "section": "Links" + }, + { + "markdown": "[link](
    )\n", + "html": "

    link

    \n", + "example": 486, + "start_line": 7543, + "end_line": 7547, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[link](foo\nbar)\n", + "html": "

    [link](foo\nbar)

    \n", + "example": 487, + "start_line": 7552, + "end_line": 7558, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "

    [link]()

    \n", + "example": 488, + "start_line": 7560, + "end_line": 7566, + "section": "Links" + }, + { + "markdown": "[a]()\n", + "html": "

    a

    \n", + "example": 489, + "start_line": 7571, + "end_line": 7575, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[link]()\n", + "html": "

    [link](<foo>)

    \n", + "example": 490, + "start_line": 7579, + "end_line": 7583, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[a](\n[a](c)\n", + "html": "

    [a](<b)c\n[a](<b)c>\n[a](c)

    \n", + "example": 491, + "start_line": 7588, + "end_line": 7596, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[link](\\(foo\\))\n", + "html": "

    link

    \n", + "example": 492, + "start_line": 7600, + "end_line": 7604, + "section": "Links" + }, + { + "markdown": "[link](foo(and(bar)))\n", + "html": "

    link

    \n", + "example": 493, + "start_line": 7609, + "end_line": 7613, + "section": "Links" + }, + { + "markdown": "[link](foo\\(and\\(bar\\))\n", + "html": "

    link

    \n", + "example": 494, + "start_line": 7618, + "end_line": 7622, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "

    link

    \n", + "example": 495, + "start_line": 7625, + "end_line": 7629, + "section": "Links" + }, + { + "markdown": "[link](foo\\)\\:)\n", + "html": "

    link

    \n", + "example": 496, + "start_line": 7635, + "end_line": 7639, + "section": "Links" + }, + { + "markdown": "[link](#fragment)\n\n[link](http://example.com#fragment)\n\n[link](http://example.com?foo=3#frag)\n", + "html": "

    link

    \n

    link

    \n

    link

    \n", + "example": 497, + "start_line": 7644, + "end_line": 7654, + "section": "Links" + }, + { + "markdown": "[link](foo\\bar)\n", + "html": "

    link

    \n", + "example": 498, + "start_line": 7660, + "end_line": 7664, + "section": "Links" + }, + { + "markdown": "[link](foo%20bä)\n", + "html": "

    link

    \n", + "example": 499, + "start_line": 7676, + "end_line": 7680, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[link](\"title\")\n", + "html": "

    link

    \n", + "example": 500, + "start_line": 7687, + "end_line": 7691, + "section": "Links" + }, + { + "markdown": "[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))\n", + "html": "

    link\nlink\nlink

    \n", + "example": 501, + "start_line": 7696, + "end_line": 7704, + "section": "Links" + }, + { + "markdown": "[link](/url \"title \\\""\")\n", + "html": "

    link

    \n", + "example": 502, + "start_line": 7710, + "end_line": 7714, + "section": "Links" + }, + { + "markdown": "[link](/url \"title\")\n", + "html": "

    link

    \n", + "example": 503, + "start_line": 7720, + "end_line": 7724, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[link](/url \"title \"and\" title\")\n", + "html": "

    [link](/url "title "and" title")

    \n", + "example": 504, + "start_line": 7729, + "end_line": 7733, + "section": "Links" + }, + { + "markdown": "[link](/url 'title \"and\" title')\n", + "html": "

    link

    \n", + "example": 505, + "start_line": 7738, + "end_line": 7742, + "section": "Links" + }, + { + "markdown": "[link]( /uri\n \"title\" )\n", + "html": "

    link

    \n", + "example": 506, + "start_line": 7762, + "end_line": 7767, + "section": "Links" + }, + { + "markdown": "[link] (/uri)\n", + "html": "

    [link] (/uri)

    \n", + "example": 507, + "start_line": 7773, + "end_line": 7777, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]](/uri)\n", + "html": "

    link [foo [bar]]

    \n", + "example": 508, + "start_line": 7783, + "end_line": 7787, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[link] bar](/uri)\n", + "html": "

    [link] bar](/uri)

    \n", + "example": 509, + "start_line": 7790, + "end_line": 7794, + "section": "Links" + }, + { + "markdown": "[link [bar](/uri)\n", + "html": "

    [link bar

    \n", + "example": 510, + "start_line": 7797, + "end_line": 7801, + "section": "Links" + }, + { + "markdown": "[link \\[bar](/uri)\n", + "html": "

    link [bar

    \n", + "example": 511, + "start_line": 7804, + "end_line": 7808, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*](/uri)\n", + "html": "

    link foo bar #

    \n", + "example": 512, + "start_line": 7813, + "end_line": 7817, + "section": "Links" + }, + { + "markdown": "[![moon](moon.jpg)](/uri)\n", + "html": "

    \"moon\"

    \n", + "example": 513, + "start_line": 7820, + "end_line": 7824, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)](/uri)\n", + "html": "

    [foo bar](/uri)

    \n", + "example": 514, + "start_line": 7829, + "end_line": 7833, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo *[bar [baz](/uri)](/uri)*](/uri)\n", + "html": "

    [foo [bar baz](/uri)](/uri)

    \n", + "example": 515, + "start_line": 7836, + "end_line": 7840, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "![[[foo](uri1)](uri2)](uri3)\n", + "html": "

    \"[foo](uri2)\"

    \n", + "example": 516, + "start_line": 7843, + "end_line": 7847, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "*[foo*](/uri)\n", + "html": "

    *foo*

    \n", + "example": 517, + "start_line": 7853, + "end_line": 7857, + "section": "Links" + }, + { + "markdown": "[foo *bar](baz*)\n", + "html": "

    foo *bar

    \n", + "example": 518, + "start_line": 7860, + "end_line": 7864, + "section": "Links" + }, + { + "markdown": "*foo [bar* baz]\n", + "html": "

    foo [bar baz]

    \n", + "example": 519, + "start_line": 7870, + "end_line": 7874, + "section": "Links" + }, + { + "markdown": "[foo \n", + "html": "

    [foo

    \n", + "example": 520, + "start_line": 7880, + "end_line": 7884, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo`](/uri)`\n", + "html": "

    [foo](/uri)

    \n", + "example": 521, + "start_line": 7887, + "end_line": 7891, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo\n", + "html": "

    [foohttp://example.com/?search=](uri)

    \n", + "example": 522, + "start_line": 7894, + "end_line": 7898, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo][bar]\n\n[bar]: /url \"title\"\n", + "html": "

    foo

    \n", + "example": 523, + "start_line": 7932, + "end_line": 7938, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]][ref]\n\n[ref]: /uri\n", + "html": "

    link [foo [bar]]

    \n", + "example": 524, + "start_line": 7947, + "end_line": 7953, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[link \\[bar][ref]\n\n[ref]: /uri\n", + "html": "

    link [bar

    \n", + "example": 525, + "start_line": 7956, + "end_line": 7962, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*][ref]\n\n[ref]: /uri\n", + "html": "

    link foo bar #

    \n", + "example": 526, + "start_line": 7967, + "end_line": 7973, + "section": "Links" + }, + { + "markdown": "[![moon](moon.jpg)][ref]\n\n[ref]: /uri\n", + "html": "

    \"moon\"

    \n", + "example": 527, + "start_line": 7976, + "end_line": 7982, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)][ref]\n\n[ref]: /uri\n", + "html": "

    [foo bar]ref

    \n", + "example": 528, + "start_line": 7987, + "end_line": 7993, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri\n", + "html": "

    [foo bar baz]ref

    \n", + "example": 529, + "start_line": 7996, + "end_line": 8002, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "*[foo*][ref]\n\n[ref]: /uri\n", + "html": "

    *foo*

    \n", + "example": 530, + "start_line": 8011, + "end_line": 8017, + "section": "Links" + }, + { + "markdown": "[foo *bar][ref]\n\n[ref]: /uri\n", + "html": "

    foo *bar

    \n", + "example": 531, + "start_line": 8020, + "end_line": 8026, + "section": "Links" + }, + { + "markdown": "[foo \n\n[ref]: /uri\n", + "html": "

    [foo

    \n", + "example": 532, + "start_line": 8032, + "end_line": 8038, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo`][ref]`\n\n[ref]: /uri\n", + "html": "

    [foo][ref]

    \n", + "example": 533, + "start_line": 8041, + "end_line": 8047, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo\n\n[ref]: /uri\n", + "html": "

    [foohttp://example.com/?search=][ref]

    \n", + "example": 534, + "start_line": 8050, + "end_line": 8056, + "section": "Links", + "shouldFail": true + }, + { + "markdown": "[foo][BaR]\n\n[bar]: /url \"title\"\n", + "html": "

    foo

    \n", + "example": 535, + "start_line": 8061, + "end_line": 8067, + "section": "Links" + }, + { + "markdown": "[Толпой][Толпой] is a Russian word.\n\n[ТОЛПОЙ]: /url\n", + "html": "

    Толпой is a Russian word.

    \n", + "example": 536, + "start_line": 8072, + "end_line": 8078, + "section": "Links" + }, + { + "markdown": "[Foo\n bar]: /url\n\n[Baz][Foo bar]\n", + "html": "

    Baz

    \n", + "example": 537, + "start_line": 8084, + "end_line": 8091, + "section": "Links" + }, + { + "markdown": "[foo] [bar]\n\n[bar]: /url \"title\"\n", + "html": "

    [foo] bar

    \n", + "example": 538, + "start_line": 8097, + "end_line": 8103, + "section": "Links" + }, + { + "markdown": "[foo]\n[bar]\n\n[bar]: /url \"title\"\n", + "html": "

    [foo]\nbar

    \n", + "example": 539, + "start_line": 8106, + "end_line": 8114, + "section": "Links" + }, + { + "markdown": "[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]\n", + "html": "

    bar

    \n", + "example": 540, + "start_line": 8147, + "end_line": 8155, + "section": "Links" + }, + { + "markdown": "[bar][foo\\!]\n\n[foo!]: /url\n", + "html": "

    [bar][foo!]

    \n", + "example": 541, + "start_line": 8162, + "end_line": 8168, + "section": "Links" + }, + { + "markdown": "[foo][ref[]\n\n[ref[]: /uri\n", + "html": "

    [foo][ref[]

    \n

    [ref[]: /uri

    \n", + "example": 542, + "start_line": 8174, + "end_line": 8181, + "section": "Links" + }, + { + "markdown": "[foo][ref[bar]]\n\n[ref[bar]]: /uri\n", + "html": "

    [foo][ref[bar]]

    \n

    [ref[bar]]: /uri

    \n", + "example": 543, + "start_line": 8184, + "end_line": 8191, + "section": "Links" + }, + { + "markdown": "[[[foo]]]\n\n[[[foo]]]: /url\n", + "html": "

    [[[foo]]]

    \n

    [[[foo]]]: /url

    \n", + "example": 544, + "start_line": 8194, + "end_line": 8201, + "section": "Links" + }, + { + "markdown": "[foo][ref\\[]\n\n[ref\\[]: /uri\n", + "html": "

    foo

    \n", + "example": 545, + "start_line": 8204, + "end_line": 8210, + "section": "Links" + }, + { + "markdown": "[bar\\\\]: /uri\n\n[bar\\\\]\n", + "html": "

    bar\\

    \n", + "example": 546, + "start_line": 8215, + "end_line": 8221, + "section": "Links" + }, + { + "markdown": "[]\n\n[]: /uri\n", + "html": "

    []

    \n

    []: /uri

    \n", + "example": 547, + "start_line": 8226, + "end_line": 8233, + "section": "Links" + }, + { + "markdown": "[\n ]\n\n[\n ]: /uri\n", + "html": "

    [\n]

    \n

    [\n]: /uri

    \n", + "example": 548, + "start_line": 8236, + "end_line": 8247, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url \"title\"\n", + "html": "

    foo

    \n", + "example": 549, + "start_line": 8259, + "end_line": 8265, + "section": "Links" + }, + { + "markdown": "[*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

    foo bar

    \n", + "example": 550, + "start_line": 8268, + "end_line": 8274, + "section": "Links" + }, + { + "markdown": "[Foo][]\n\n[foo]: /url \"title\"\n", + "html": "

    Foo

    \n", + "example": 551, + "start_line": 8279, + "end_line": 8285, + "section": "Links" + }, + { + "markdown": "[foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "

    foo\n[]

    \n", + "example": 552, + "start_line": 8292, + "end_line": 8300, + "section": "Links" + }, + { + "markdown": "[foo]\n\n[foo]: /url \"title\"\n", + "html": "

    foo

    \n", + "example": 553, + "start_line": 8312, + "end_line": 8318, + "section": "Links" + }, + { + "markdown": "[*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

    foo bar

    \n", + "example": 554, + "start_line": 8321, + "end_line": 8327, + "section": "Links" + }, + { + "markdown": "[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

    [foo bar]

    \n", + "example": 555, + "start_line": 8330, + "end_line": 8336, + "section": "Links" + }, + { + "markdown": "[[bar [foo]\n\n[foo]: /url\n", + "html": "

    [[bar foo

    \n", + "example": 556, + "start_line": 8339, + "end_line": 8345, + "section": "Links" + }, + { + "markdown": "[Foo]\n\n[foo]: /url \"title\"\n", + "html": "

    Foo

    \n", + "example": 557, + "start_line": 8350, + "end_line": 8356, + "section": "Links" + }, + { + "markdown": "[foo] bar\n\n[foo]: /url\n", + "html": "

    foo bar

    \n", + "example": 558, + "start_line": 8361, + "end_line": 8367, + "section": "Links" + }, + { + "markdown": "\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "

    [foo]

    \n", + "example": 559, + "start_line": 8373, + "end_line": 8379, + "section": "Links" + }, + { + "markdown": "[foo*]: /url\n\n*[foo*]\n", + "html": "

    *foo*

    \n", + "example": 560, + "start_line": 8385, + "end_line": 8391, + "section": "Links" + }, + { + "markdown": "[foo][bar]\n\n[foo]: /url1\n[bar]: /url2\n", + "html": "

    foo

    \n", + "example": 561, + "start_line": 8397, + "end_line": 8404, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url1\n", + "html": "

    foo

    \n", + "example": 562, + "start_line": 8406, + "end_line": 8412, + "section": "Links" + }, + { + "markdown": "[foo]()\n\n[foo]: /url1\n", + "html": "

    foo

    \n", + "example": 563, + "start_line": 8416, + "end_line": 8422, + "section": "Links" + }, + { + "markdown": "[foo](not a link)\n\n[foo]: /url1\n", + "html": "

    foo(not a link)

    \n", + "example": 564, + "start_line": 8424, + "end_line": 8430, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url\n", + "html": "

    [foo]bar

    \n", + "example": 565, + "start_line": 8435, + "end_line": 8441, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2\n", + "html": "

    foobaz

    \n", + "example": 566, + "start_line": 8447, + "end_line": 8454, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2\n", + "html": "

    [foo]bar

    \n", + "example": 567, + "start_line": 8460, + "end_line": 8467, + "section": "Links" + }, + { + "markdown": "![foo](/url \"title\")\n", + "html": "

    \"foo\"

    \n", + "example": 568, + "start_line": 8483, + "end_line": 8487, + "section": "Images" + }, + { + "markdown": "![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "

    \"foo

    \n", + "example": 569, + "start_line": 8490, + "end_line": 8496, + "section": "Images", + "shouldFail": true + }, + { + "markdown": "![foo ![bar](/url)](/url2)\n", + "html": "

    \"foo

    \n", + "example": 570, + "start_line": 8499, + "end_line": 8503, + "section": "Images", + "shouldFail": true + }, + { + "markdown": "![foo [bar](/url)](/url2)\n", + "html": "

    \"foo

    \n", + "example": 571, + "start_line": 8506, + "end_line": 8510, + "section": "Images", + "shouldFail": true + }, + { + "markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "

    \"foo

    \n", + "example": 572, + "start_line": 8520, + "end_line": 8526, + "section": "Images", + "shouldFail": true + }, + { + "markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n", + "html": "

    \"foo

    \n", + "example": 573, + "start_line": 8529, + "end_line": 8535, + "section": "Images", + "shouldFail": true + }, + { + "markdown": "![foo](train.jpg)\n", + "html": "

    \"foo\"

    \n", + "example": 574, + "start_line": 8538, + "end_line": 8542, + "section": "Images" + }, + { + "markdown": "My ![foo bar](/path/to/train.jpg \"title\" )\n", + "html": "

    My \"foo

    \n", + "example": 575, + "start_line": 8545, + "end_line": 8549, + "section": "Images" + }, + { + "markdown": "![foo]()\n", + "html": "

    \"foo\"

    \n", + "example": 576, + "start_line": 8552, + "end_line": 8556, + "section": "Images" + }, + { + "markdown": "![](/url)\n", + "html": "

    \"\"

    \n", + "example": 577, + "start_line": 8559, + "end_line": 8563, + "section": "Images" + }, + { + "markdown": "![foo][bar]\n\n[bar]: /url\n", + "html": "

    \"foo\"

    \n", + "example": 578, + "start_line": 8568, + "end_line": 8574, + "section": "Images" + }, + { + "markdown": "![foo][bar]\n\n[BAR]: /url\n", + "html": "

    \"foo\"

    \n", + "example": 579, + "start_line": 8577, + "end_line": 8583, + "section": "Images" + }, + { + "markdown": "![foo][]\n\n[foo]: /url \"title\"\n", + "html": "

    \"foo\"

    \n", + "example": 580, + "start_line": 8588, + "end_line": 8594, + "section": "Images" + }, + { + "markdown": "![*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

    \"foo

    \n", + "example": 581, + "start_line": 8597, + "end_line": 8603, + "section": "Images", + "shouldFail": true + }, + { + "markdown": "![Foo][]\n\n[foo]: /url \"title\"\n", + "html": "

    \"Foo\"

    \n", + "example": 582, + "start_line": 8608, + "end_line": 8614, + "section": "Images" + }, + { + "markdown": "![foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "

    \"foo\"\n[]

    \n", + "example": 583, + "start_line": 8620, + "end_line": 8628, + "section": "Images" + }, + { + "markdown": "![foo]\n\n[foo]: /url \"title\"\n", + "html": "

    \"foo\"

    \n", + "example": 584, + "start_line": 8633, + "end_line": 8639, + "section": "Images" + }, + { + "markdown": "![*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "

    \"foo

    \n", + "example": 585, + "start_line": 8642, + "end_line": 8648, + "section": "Images", + "shouldFail": true + }, + { + "markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n", + "html": "

    ![[foo]]

    \n

    [[foo]]: /url "title"

    \n", + "example": 586, + "start_line": 8653, + "end_line": 8660, + "section": "Images" + }, + { + "markdown": "![Foo]\n\n[foo]: /url \"title\"\n", + "html": "

    \"Foo\"

    \n", + "example": 587, + "start_line": 8665, + "end_line": 8671, + "section": "Images" + }, + { + "markdown": "!\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "

    ![foo]

    \n", + "example": 588, + "start_line": 8677, + "end_line": 8683, + "section": "Images" + }, + { + "markdown": "\\![foo]\n\n[foo]: /url \"title\"\n", + "html": "

    !foo

    \n", + "example": 589, + "start_line": 8689, + "end_line": 8695, + "section": "Images" + }, + { + "markdown": "\n", + "html": "

    http://foo.bar.baz

    \n", + "example": 590, + "start_line": 8722, + "end_line": 8726, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    http://foo.bar.baz/test?q=hello&id=22&boolean

    \n", + "example": 591, + "start_line": 8729, + "end_line": 8733, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    irc://foo.bar:2233/baz

    \n", + "example": 592, + "start_line": 8736, + "end_line": 8740, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    MAILTO:FOO@BAR.BAZ

    \n", + "example": 593, + "start_line": 8745, + "end_line": 8749, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    a+b+c:d

    \n", + "example": 594, + "start_line": 8757, + "end_line": 8761, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    made-up-scheme://foo,bar

    \n", + "example": 595, + "start_line": 8764, + "end_line": 8768, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    http://../

    \n", + "example": 596, + "start_line": 8771, + "end_line": 8775, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    localhost:5001/foo

    \n", + "example": 597, + "start_line": 8778, + "end_line": 8782, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    <http://foo.bar/baz bim>

    \n", + "example": 598, + "start_line": 8787, + "end_line": 8791, + "section": "Autolinks", + "shouldFail": true + }, + { + "markdown": "\n", + "html": "

    http://example.com/\\[\\

    \n", + "example": 599, + "start_line": 8796, + "end_line": 8800, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    foo@bar.example.com

    \n", + "example": 600, + "start_line": 8818, + "end_line": 8822, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    foo+special@Bar.baz-bar0.com

    \n", + "example": 601, + "start_line": 8825, + "end_line": 8829, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    <foo+@bar.example.com>

    \n", + "example": 602, + "start_line": 8834, + "end_line": 8838, + "section": "Autolinks" + }, + { + "markdown": "<>\n", + "html": "

    <>

    \n", + "example": 603, + "start_line": 8843, + "end_line": 8847, + "section": "Autolinks" + }, + { + "markdown": "< http://foo.bar >\n", + "html": "

    < http://foo.bar >

    \n", + "example": 604, + "start_line": 8850, + "end_line": 8854, + "section": "Autolinks", + "shouldFail": true + }, + { + "markdown": "\n", + "html": "

    <m:abc>

    \n", + "example": 605, + "start_line": 8857, + "end_line": 8861, + "section": "Autolinks" + }, + { + "markdown": "\n", + "html": "

    <foo.bar.baz>

    \n", + "example": 606, + "start_line": 8864, + "end_line": 8868, + "section": "Autolinks" + }, + { + "markdown": "http://example.com\n", + "html": "

    http://example.com

    \n", + "example": 607, + "start_line": 8871, + "end_line": 8875, + "section": "Autolinks", + "shouldFail": true + }, + { + "markdown": "foo@bar.example.com\n", + "html": "

    foo@bar.example.com

    \n", + "example": 608, + "start_line": 8878, + "end_line": 8882, + "section": "Autolinks", + "shouldFail": true + }, + { + "markdown": "\n", + "html": "

    \n", + "example": 609, + "start_line": 8960, + "end_line": 8964, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

    \n", + "example": 610, + "start_line": 8969, + "end_line": 8973, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

    \n", + "example": 611, + "start_line": 8978, + "end_line": 8984, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

    \n", + "example": 612, + "start_line": 8989, + "end_line": 8995, + "section": "Raw HTML" + }, + { + "markdown": "Foo \n", + "html": "

    Foo

    \n", + "example": 613, + "start_line": 9000, + "end_line": 9004, + "section": "Raw HTML" + }, + { + "markdown": "<33> <__>\n", + "html": "

    <33> <__>

    \n", + "example": 614, + "start_line": 9009, + "end_line": 9013, + "section": "Raw HTML" + }, + { + "markdown": "
    \n", + "html": "

    <a h*#ref="hi">

    \n", + "example": 615, + "start_line": 9018, + "end_line": 9022, + "section": "Raw HTML" + }, + { + "markdown": "
    \n", + "html": "

    <a href="hi'> <a href=hi'>

    \n", + "example": 616, + "start_line": 9027, + "end_line": 9031, + "section": "Raw HTML" + }, + { + "markdown": "< a><\nfoo>\n\n", + "html": "

    < a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop />

    \n", + "example": 617, + "start_line": 9036, + "end_line": 9046, + "section": "Raw HTML" + }, + { + "markdown": "
    \n", + "html": "

    <a href='bar'title=title>

    \n", + "example": 618, + "start_line": 9051, + "end_line": 9055, + "section": "Raw HTML" + }, + { + "markdown": "
    \n", + "html": "

    \n", + "example": 619, + "start_line": 9060, + "end_line": 9064, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

    </a href="foo">

    \n", + "example": 620, + "start_line": 9069, + "end_line": 9073, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

    foo

    \n", + "example": 621, + "start_line": 9078, + "end_line": 9084, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

    foo <!-- not a comment -- two hyphens -->

    \n", + "example": 622, + "start_line": 9087, + "end_line": 9091, + "section": "Raw HTML", + "shouldFail": true + }, + { + "markdown": "foo foo -->\n\nfoo \n", + "html": "

    foo <!--> foo -->

    \n

    foo <!-- foo--->

    \n", + "example": 623, + "start_line": 9096, + "end_line": 9103, + "section": "Raw HTML", + "shouldFail": true + }, + { + "markdown": "foo \n", + "html": "

    foo

    \n", + "example": 624, + "start_line": 9108, + "end_line": 9112, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

    foo

    \n", + "example": 625, + "start_line": 9117, + "end_line": 9121, + "section": "Raw HTML" + }, + { + "markdown": "foo &<]]>\n", + "html": "

    foo &<]]>

    \n", + "example": 626, + "start_line": 9126, + "end_line": 9130, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

    foo

    \n", + "example": 627, + "start_line": 9136, + "end_line": 9140, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "

    foo

    \n", + "example": 628, + "start_line": 9145, + "end_line": 9149, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "

    <a href=""">

    \n", + "example": 629, + "start_line": 9152, + "end_line": 9156, + "section": "Raw HTML" + }, + { + "markdown": "foo \nbaz\n", + "html": "

    foo
    \nbaz

    \n", + "example": 630, + "start_line": 9166, + "end_line": 9172, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\nbaz\n", + "html": "

    foo
    \nbaz

    \n", + "example": 631, + "start_line": 9178, + "end_line": 9184, + "section": "Hard line breaks" + }, + { + "markdown": "foo \nbaz\n", + "html": "

    foo
    \nbaz

    \n", + "example": 632, + "start_line": 9189, + "end_line": 9195, + "section": "Hard line breaks" + }, + { + "markdown": "foo \n bar\n", + "html": "

    foo
    \nbar

    \n", + "example": 633, + "start_line": 9200, + "end_line": 9206, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\n bar\n", + "html": "

    foo
    \nbar

    \n", + "example": 634, + "start_line": 9209, + "end_line": 9215, + "section": "Hard line breaks" + }, + { + "markdown": "*foo \nbar*\n", + "html": "

    foo
    \nbar

    \n", + "example": 635, + "start_line": 9221, + "end_line": 9227, + "section": "Hard line breaks" + }, + { + "markdown": "*foo\\\nbar*\n", + "html": "

    foo
    \nbar

    \n", + "example": 636, + "start_line": 9230, + "end_line": 9236, + "section": "Hard line breaks" + }, + { + "markdown": "`code \nspan`\n", + "html": "

    code span

    \n", + "example": 637, + "start_line": 9241, + "end_line": 9246, + "section": "Hard line breaks" + }, + { + "markdown": "`code\\\nspan`\n", + "html": "

    code\\ span

    \n", + "example": 638, + "start_line": 9249, + "end_line": 9254, + "section": "Hard line breaks" + }, + { + "markdown": "
    \n", + "html": "

    \n", + "example": 639, + "start_line": 9259, + "end_line": 9265, + "section": "Hard line breaks" + }, + { + "markdown": "\n", + "html": "

    \n", + "example": 640, + "start_line": 9268, + "end_line": 9274, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\n", + "html": "

    foo\\

    \n", + "example": 641, + "start_line": 9281, + "end_line": 9285, + "section": "Hard line breaks" + }, + { + "markdown": "foo \n", + "html": "

    foo

    \n", + "example": 642, + "start_line": 9288, + "end_line": 9292, + "section": "Hard line breaks" + }, + { + "markdown": "### foo\\\n", + "html": "

    foo\\

    \n", + "example": 643, + "start_line": 9295, + "end_line": 9299, + "section": "Hard line breaks" + }, + { + "markdown": "### foo \n", + "html": "

    foo

    \n", + "example": 644, + "start_line": 9302, + "end_line": 9306, + "section": "Hard line breaks" + }, + { + "markdown": "foo\nbaz\n", + "html": "

    foo\nbaz

    \n", + "example": 645, + "start_line": 9317, + "end_line": 9323, + "section": "Soft line breaks" + }, + { + "markdown": "foo \n baz\n", + "html": "

    foo\nbaz

    \n", + "example": 646, + "start_line": 9329, + "end_line": 9335, + "section": "Soft line breaks" + }, + { + "markdown": "hello $.;'there\n", + "html": "

    hello $.;'there

    \n", + "example": 647, + "start_line": 9349, + "end_line": 9353, + "section": "Textual content" + }, + { + "markdown": "Foo χρῆν\n", + "html": "

    Foo χρῆν

    \n", + "example": 648, + "start_line": 9356, + "end_line": 9360, + "section": "Textual content" + }, + { + "markdown": "Multiple spaces\n", + "html": "

    Multiple spaces

    \n", + "example": 649, + "start_line": 9365, + "end_line": 9369, + "section": "Textual content" + } +] diff --git a/test/specs/commonMark/commonmark.0.29.md b/test/specs/commonMark/commonmark.0.29.md new file mode 100644 index 00000000..3244e153 --- /dev/null +++ b/test/specs/commonMark/commonmark.0.29.md @@ -0,0 +1,2316 @@ +## Test Result + +Total test 649 examples, and failed 126 examples: + +**Example45** + +```markdown +Markdown content +# foo# + +Expected Html +

    foo#

    + +Actural Html +

    foo

    + +``` + +**Example46** + +```markdown +Markdown content +### foo \### +## foo #\## +# foo \# + +Expected Html +

    foo ###

    +

    foo ###

    +

    foo #

    + +Actural Html +

    foo \

    +

    foo #\

    +

    foo \

    + +``` + +**Example49** + +```markdown +Markdown content +## +# +### ### + +Expected Html +

    +

    +

    + +Actural Html +

    ## +#

    +

    #

    + +``` + +**Example51** + +```markdown +Markdown content +Foo *bar +baz* +==== + +Expected Html +

    Foo bar +baz

    + +Actural Html +

    Foo *bar

    +

    baz*

    + +``` + +**Example52** + +```markdown +Markdown content + Foo *bar +baz* +==== + +Expected Html +

    Foo bar +baz

    + +Actural Html +

    Foo *bar

    +

    baz*

    + +``` + +**Example53** + +```markdown +Markdown content +Foo +------------------------- + +Foo += + +Expected Html +

    Foo

    +

    Foo

    + +Actural Html +

    Foo

    +

    Foo +=

    + +``` + +**Example63** + +```markdown +Markdown content +> foo +bar +=== + +Expected Html +
    +

    foo +bar +===

    +
    + +Actural Html +
    +

    foo

    +
    +

    bar

    + +``` + +**Example65** + +```markdown +Markdown content +Foo +Bar +--- + +Expected Html +

    Foo +Bar

    + +Actural Html +

    Foo

    +

    Bar

    + +``` + +**Example116** + +```markdown +Markdown content +~~~ aa \`\`\` ~~~ +foo +~~~ + +Expected Html +
    foo
    +
    + +Actural Html +

    ~ aa ``` ~ +foo

    +
    
    +
    + +``` + +**Example164** + +```markdown +Markdown content +[Foo bar]: + +'title' + +[Foo bar] + +Expected Html +

    Foo bar

    + +Actural Html +

    [Foo bar]: + +'title'

    +

    [Foo bar]

    + +``` + +**Example169** + +```markdown +Markdown content +[foo]: <> + +[foo] + +Expected Html +

    foo

    + +Actural Html +

    foo

    + +``` + +**Example171** + +```markdown +Markdown content +[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo] + +Expected Html +

    foo

    + +Actural Html +

    foo

    + +``` + +**Example205** + +```markdown +Markdown content +> - foo +- bar + +Expected Html +
    +
      +
    • foo
    • +
    +
    +
      +
    • bar
    • +
    + +Actural Html +
    +
      +
    • foo
    • +
    • bar
    • +
    +
    + +``` + +**Example206** + +```markdown +Markdown content +> foo + bar + +Expected Html +
    +
    foo
    +
    +
    +
    bar
    +
    + +Actural Html +
    +
    foo
    +bar
    +
    +
    + +``` + +**Example207** + +```markdown +Markdown content +> \`\`\` +foo +\`\`\` + +Expected Html +
    +
    +
    +

    foo

    +
    + +Actural Html +
    +
    foo
    +
    +
    + +``` + +**Example225** + +```markdown +Markdown content +- one + + two + +Expected Html +
      +
    • one
    • +
    +

    two

    + +Actural Html +
      +
    • one

      +

      two

      +
    • +
    + +``` + +**Example227** + +```markdown +Markdown content + - one + + two + +Expected Html +
      +
    • one
    • +
    +
     two
    +
    + +Actural Html +
      +
    • one

      +

      two

      +
    • +
    + +``` + +**Example232** + +```markdown +Markdown content +- foo + + + bar + +Expected Html +
      +
    • +

      foo

      +

      bar

      +
    • +
    + +Actural Html +
      +
    • foo
    • +
    +

    bar

    + +``` + +**Example234** + +```markdown +Markdown content +- Foo + + bar + + + baz + +Expected Html +
      +
    • +

      Foo

      +
      bar
      +
      +
      +baz
      +
      +
    • +
    + +Actural Html +
      +
    • Foo

      +
      bar
      +
      +
    • +
    +
      baz
    +
    + +``` + +**Example243** + +```markdown +Markdown content +1. indented code + + paragraph + + more code + +Expected Html +
      +
    1. +
      indented code
      +
      +

      paragraph

      +
      more code
      +
      +
    2. +
    + +Actural Html +
      +
    1. indented code

      +

      paragraph

      +

      more code

      +
    2. +
    + +``` + +**Example244** + +```markdown +Markdown content +1. indented code + + paragraph + + more code + +Expected Html +
      +
    1. +
       indented code
      +
      +

      paragraph

      +
      more code
      +
      +
    2. +
    + +Actural Html +
      +
    1. indented code

      +

      paragraph

      +

      more code

      +
    2. +
    + +``` + +**Example246** + +```markdown +Markdown content +- foo + + bar + +Expected Html +
      +
    • foo
    • +
    +

    bar

    + +Actural Html +
      +
    • foo

      +

      bar

      +
    • +
    + +``` + +**Example248** + +```markdown +Markdown content +- + foo +- + \`\`\` + bar + \`\`\` +- + baz + +Expected Html +
      +
    • foo
    • +
    • +
      bar
      +
      +
    • +
    • +
      baz
      +
      +
    • +
    + +Actural Html +

    - + foo +-

    +
      bar
    +
    +

    - + baz

    + +``` + +**Example250** + +```markdown +Markdown content +- + + foo + +Expected Html +
      +
    • +
    +

    foo

    + +Actural Html +

    -

    +

    foo

    + +``` + +**Example254** + +```markdown +Markdown content +* + +Expected Html +
      +
    • +
    + +Actural Html +

    *

    + +``` + +**Example265** + +```markdown +Markdown content +- foo + - bar + - baz + - boo + +Expected Html +
      +
    • foo
    • +
    • bar
    • +
    • baz
    • +
    • boo
    • +
    + +Actural Html +
      +
    • foo
        +
      • bar
      • +
      • baz
          +
        • boo
        • +
        +
      • +
      +
    • +
    + +``` + +**Example267** + +```markdown +Markdown content +10) foo + - bar + +Expected Html +
      +
    1. foo
    2. +
    +
      +
    • bar
    • +
    + +Actural Html +
      +
    1. foo
        +
      • bar
      • +
      +
    2. +
    + +``` + +**Example274** + +```markdown +Markdown content +The number of windows in my house is +14. The number of doors is 6. + +Expected Html +

    The number of windows in my house is +14. The number of doors is 6.

    + +Actural Html +

    The number of windows in my house is

    +
      +
    1. The number of doors is 6.
    2. +
    + +``` + +**Example276** + +```markdown +Markdown content +- foo + +- bar + + +- baz + +Expected Html +
      +
    • +

      foo

      +
    • +
    • +

      bar

      +
    • +
    • +

      baz

      +
    • +
    + +Actural Html +
      +
    • foo

      +
    • +
    • bar

      +
    • +
    +
      +
    • baz
    • +
    + +``` + +**Example277** + +```markdown +Markdown content +- foo + - bar + - baz + + + bim + +Expected Html +
      +
    • foo +
        +
      • bar +
          +
        • +

          baz

          +

          bim

          +
        • +
        +
      • +
      +
    • +
    + +Actural Html +
      +
    • foo
        +
      • bar
          +
        • baz
        • +
        +
      • +
      +
    • +
    +
      bim
    +
    + +``` + +**Example280** + +```markdown +Markdown content +- a + - b + - c + - d + - e + - f +- g + +Expected Html +
      +
    • a
    • +
    • b
    • +
    • c
    • +
    • d
    • +
    • e
    • +
    • f
    • +
    • g
    • +
    + +Actural Html +
      +
    • a
        +
      • b
      • +
      • c
          +
        • d
        • +
        +
      • +
      • e
      • +
      • f
      • +
      +
    • +
    • g
    • +
    + +``` + +**Example281** + +```markdown +Markdown content +1. a + + 2. b + + 3. c + +Expected Html +
      +
    1. +

      a

      +
    2. +
    3. +

      b

      +
    4. +
    5. +

      c

      +
    6. +
    + +Actural Html +
      +
    1. a

      +
        +
      1. b

        +
      2. +
      3. c

        +
      4. +
      +
    2. +
    + +``` + +**Example282** + +```markdown +Markdown content +- a + - b + - c + - d + - e + +Expected Html +
      +
    • a
    • +
    • b
    • +
    • c
    • +
    • d +- e
    • +
    + +Actural Html +
      +
    • a
        +
      • b
      • +
      • c
          +
        • d
        • +
        • e
        • +
        +
      • +
      +
    • +
    + +``` + +**Example283** + +```markdown +Markdown content +1. a + + 2. b + + 3. c + +Expected Html +
      +
    1. +

      a

      +
    2. +
    3. +

      b

      +
    4. +
    +
    3. c
    +
    + +Actural Html +
      +
    1. a

      +
        +
      1. b

        +
          +
        1. c
        2. +
        +
      2. +
      +
    2. +
    + +``` + +**Example285** + +```markdown +Markdown content +* a +* + +* c + +Expected Html +
      +
    • +

      a

      +
    • +
    • +
    • +

      c

      +
    • +
    + +Actural Html +
      +
    • a

      +
    • +
    • +
    • +
    • c

      +
    • +
    + +``` + +**Example287** + +```markdown +Markdown content +- a +- b + + [ref]: /url +- d + +Expected Html +
      +
    • +

      a

      +
    • +
    • +

      b

      +
    • +
    • +

      d

      +
    • +
    + +Actural Html +
      +
    • a
    • +
    • b
    • +
    +
      +
    • d
    • +
    + +``` + +**Example288** + +```markdown +Markdown content +- a +- \`\`\` + b + + + \`\`\` +- c + +Expected Html +
      +
    • a
    • +
    • +
      b
      +
      +
      +
      +
    • +
    • c
    • +
    + +Actural Html +
      +
    • a
    • +
    • b
      +
      +
      +
      +
    • +
    +
    - c
    +
    + +``` + +**Example289** + +```markdown +Markdown content +- a + - b + + c +- d + +Expected Html +
      +
    • a +
        +
      • +

        b

        +

        c

        +
      • +
      +
    • +
    • d
    • +
    + +Actural Html +
      +
    • a

      +
        +
      • b

        +

        c

        +
      • +
      +
    • +
    • d

      +
    • +
    + +``` + +**Example291** + +```markdown +Markdown content +- a + > b + \`\`\` + c + \`\`\` +- d + +Expected Html +
      +
    • a +
      +

      b

      +
      +
      c
      +
      +
    • +
    • d
    • +
    + +Actural Html +
      +
    • a
      +

      b

      +
      c
      +
      +
      +
    • +
    • d
    • +
    + +``` + +**Example309** + +```markdown +Markdown content +[foo] + +[foo]: /bar\* "ti\*tle" + +Expected Html +

    foo

    + +Actural Html +

    foo

    + +``` + +**Example314** + +```markdown +Markdown content +  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?; + +Expected Html +

    &nbsp &x; &#; &#x; +&#987654321; +&#abcdef0; +&ThisIsNotDefined; &hi?;

    + +Actural Html +

    &nbsp &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?;

    + +``` + +**Example318** + +```markdown +Markdown content +[foo](/föö "föö") + +Expected Html +

    foo

    + +Actural Html +

    foo

    + +``` + +**Example319** + +```markdown +Markdown content +[foo] + +[foo]: /föö "föö" + +Expected Html +

    foo

    + +Actural Html +

    foo

    + +``` + +**Example341** + +```markdown +Markdown content +*foo\`*\` + +Expected Html +

    *foo*

    + +Actural Html +

    foo``

    + +``` + +**Example342** + +```markdown +Markdown content +[not a \`link](/foo\`) + +Expected Html +

    [not a link](/foo)

    + +Actural Html +

    not a `link

    + +``` + +**Example353** + +```markdown +Markdown content +* a * + +Expected Html +

    * a *

    + +Actural Html +
      +
    • a *
    • +
    + +``` + +**Example361** + +```markdown +Markdown content +пристаням_стремятся_ + +Expected Html +

    пристаням_стремятся_

    + +Actural Html +

    пристанямстремятся

    + +``` + +**Example367** + +```markdown +Markdown content +*(*foo) + +Expected Html +

    *(*foo)

    + +Actural Html +

    (foo)

    + +``` + +**Example368** + +```markdown +Markdown content +*(*foo*)* + +Expected Html +

    (foo)

    + +Actural Html +

    (foo)

    + +``` + +**Example371** + +```markdown +Markdown content +_(_foo) + +Expected Html +

    _(_foo)

    + +Actural Html +

    (foo)

    + +``` + +**Example372** + +```markdown +Markdown content +_(_foo_)_ + +Expected Html +

    (foo)

    + +Actural Html +

    (foo_)_

    + +``` + +**Example379** + +```markdown +Markdown content +a**"foo"** + +Expected Html +

    a**"foo"**

    + +Actural Html +

    a"foo"

    + +``` + +**Example387** + +```markdown +Markdown content +пристаням__стремятся__ + +Expected Html +

    пристаням__стремятся__

    + +Actural Html +

    пристанямстремятся

    + +``` + +**Example388** + +```markdown +Markdown content +__foo, __bar__, baz__ + +Expected Html +

    foo, bar, baz

    + +Actural Html +

    foo, __bar, baz__

    + +``` + +**Example390** + +```markdown +Markdown content +**foo bar ** + +Expected Html +

    **foo bar **

    + +Actural Html +

    *foo bar *

    + +``` + +**Example391** + +```markdown +Markdown content +**(**foo) + +Expected Html +

    **(**foo)

    + +Actural Html +

    (foo)

    + +``` + +**Example397** + +```markdown +Markdown content +__(__foo) + +Expected Html +

    __(__foo)

    + +Actural Html +

    (foo)

    + +``` + +**Example399** + +```markdown +Markdown content +__foo__bar + +Expected Html +

    __foo__bar

    + +Actural Html +

    foobar

    + +``` + +**Example400** + +```markdown +Markdown content +__пристаням__стремятся + +Expected Html +

    __пристаням__стремятся

    + +Actural Html +

    пристанямстремятся

    + +``` + +**Example401** + +```markdown +Markdown content +__foo__bar__baz__ + +Expected Html +

    foo__bar__baz

    + +Actural Html +

    foobar__baz__

    + +``` + +**Example406** + +```markdown +Markdown content +_foo _bar_ baz_ + +Expected Html +

    foo bar baz

    + +Actural Html +

    foo _bar baz_

    + +``` + +**Example407** + +```markdown +Markdown content +__foo_ bar_ + +Expected Html +

    foo bar

    + +Actural Html +

    _foo bar_

    + +``` + +**Example412** + +```markdown +Markdown content +***foo** bar* + +Expected Html +

    foo bar

    + +Actural Html +

    *foo bar*

    + +``` + +**Example413** + +```markdown +Markdown content +*foo **bar*** + +Expected Html +

    foo bar

    + +Actural Html +

    foo *bar***

    + +``` + +**Example414** + +```markdown +Markdown content +*foo**bar*** + +Expected Html +

    foobar

    + +Actural Html +

    foo*bar***

    + +``` + +**Example415** + +```markdown +Markdown content +foo***bar***baz + +Expected Html +

    foobarbaz

    + +Actural Html +

    foobarbaz

    + +``` + +**Example416** + +```markdown +Markdown content +foo******bar*********baz + +Expected Html +

    foobar***baz

    + +Actural Html +

    foo**bar*****baz

    + +``` + +**Example417** + +```markdown +Markdown content +*foo **bar *baz* bim** bop* + +Expected Html +

    foo bar baz bim bop

    + +Actural Html +

    foo **bar *baz bim* bop

    + +``` + +**Example418** + +```markdown +Markdown content +*foo [*bar*](/url)* + +Expected Html +

    foo bar

    + +Actural Html +

    foo [bar](/url)

    + +``` + +**Example424** + +```markdown +Markdown content +__foo __bar__ baz__ + +Expected Html +

    foo bar baz

    + +Actural Html +

    foo __bar baz__

    + +``` + +**Example425** + +```markdown +Markdown content +____foo__ bar__ + +Expected Html +

    foo bar

    + +Actural Html +

    __foo bar__

    + +``` + +**Example431** + +```markdown +Markdown content +**foo *bar **baz** +bim* bop** + +Expected Html +

    foo bar baz +bim bop

    + +Actural Html +

    foo bar *baz +bim* bop**

    + +``` + +**Example441** + +```markdown +Markdown content +**foo* + +Expected Html +

    *foo

    + +Actural Html +

    *foo

    + +``` + +**Example442** + +```markdown +Markdown content +*foo** + +Expected Html +

    foo*

    + +Actural Html +

    foo*

    + +``` + +**Example443** + +```markdown +Markdown content +***foo** + +Expected Html +

    *foo

    + +Actural Html +

    *foo

    + +``` + +**Example444** + +```markdown +Markdown content +****foo* + +Expected Html +

    ***foo

    + +Actural Html +

    ***foo

    + +``` + +**Example445** + +```markdown +Markdown content +**foo*** + +Expected Html +

    foo*

    + +Actural Html +

    foo*

    + +``` + +**Example446** + +```markdown +Markdown content +*foo**** + +Expected Html +

    foo***

    + +Actural Html +

    foo***

    + +``` + +**Example453** + +```markdown +Markdown content +__foo_ + +Expected Html +

    _foo

    + +Actural Html +

    _foo

    + +``` + +**Example454** + +```markdown +Markdown content +_foo__ + +Expected Html +

    foo_

    + +Actural Html +

    foo_

    + +``` + +**Example455** + +```markdown +Markdown content +___foo__ + +Expected Html +

    _foo

    + +Actural Html +

    _foo

    + +``` + +**Example456** + +```markdown +Markdown content +____foo_ + +Expected Html +

    ___foo

    + +Actural Html +

    ___foo

    + +``` + +**Example457** + +```markdown +Markdown content +__foo___ + +Expected Html +

    foo_

    + +Actural Html +

    foo_

    + +``` + +**Example458** + +```markdown +Markdown content +_foo____ + +Expected Html +

    foo___

    + +Actural Html +

    foo___

    + +``` + +**Example465** + +```markdown +Markdown content +******foo****** + +Expected Html +

    foo

    + +Actural Html +

    **foo**

    + +``` + +**Example466** + +```markdown +Markdown content +***foo*** + +Expected Html +

    foo

    + +Actural Html +

    foo

    + +``` + +**Example467** + +```markdown +Markdown content +_____foo_____ + +Expected Html +

    foo

    + +Actural Html +

    foo

    + +``` + +**Example470** + +```markdown +Markdown content +**foo **bar baz** + +Expected Html +

    **foo bar baz

    + +Actural Html +

    foo **bar baz

    + +``` + +**Example471** + +```markdown +Markdown content +*foo *bar baz* + +Expected Html +

    *foo bar baz

    + +Actural Html +

    foo *bar baz

    + +``` + +**Example475** + +```markdown +Markdown content +** + +Expected Html +

    **

    + +Actural Html +

    <a href="">

    + +``` + +**Example476** + +```markdown +Markdown content +__
    + +Expected Html +

    __

    + +Actural Html +

    <a href="">

    + +``` + +**Example477** + +```markdown +Markdown content +*a \`*\`* + +Expected Html +

    a *

    + +Actural Html +

    a ``*

    + +``` + +**Example479** + +```markdown +Markdown content +**a + +Expected Html +

    **ahttp://foo.bar/?q=**

    + +Actural Html +

    a<http://foo.bar/?q=>

    + +``` + +**Example480** + +```markdown +Markdown content +__a + +Expected Html +

    __ahttp://foo.bar/?q=__

    + +Actural Html +

    a<http://foo.bar/?q=>

    + +``` + +**Example486** + +```markdown +Markdown content +[link]() + +Expected Html +

    link

    + +Actural Html +

    [link](</my uri>)

    + +``` + +**Example489** + +```markdown +Markdown content +[a]() + +Expected Html +

    a

    + +Actural Html +

    ac>)

    + +``` + +**Example490** + +```markdown +Markdown content +[link]() + +Expected Html +

    [link](<foo>)

    + +Actural Html +

    link

    + +``` + +**Example491** + +```markdown +Markdown content +[a]( +[a](c) + +Expected Html +

    [a](<b)c +[a](<b)c> +[a](c)

    + +Actural Html +

    ac +ac> +a

    + +``` + +**Example499** + +```markdown +Markdown content +[link](foo%20bä) + +Expected Html +

    link

    + +Actural Html +

    link

    + +``` + +**Example503** + +```markdown +Markdown content +[link](/url "title") + +Expected Html +

    link

    + +Actural Html +

    link

    + +``` + +**Example508** + +```markdown +Markdown content +[link [foo [bar]]](/uri) + +Expected Html +

    link [foo [bar]]

    + +Actural Html +

    [link [foo [bar]]](/uri)

    + +``` + +**Example514** + +```markdown +Markdown content +[foo [bar](/uri)](/uri) + +Expected Html +

    [foo bar](/uri)

    + +Actural Html +

    foo bar

    + +``` + +**Example515** + +```markdown +Markdown content +[foo *[bar [baz](/uri)](/uri)*](/uri) + +Expected Html +

    [foo [bar baz](/uri)](/uri)

    + +Actural Html +

    [foo *bar baz*](/uri)

    + +``` + +**Example516** + +```markdown +Markdown content +![[[foo](uri1)](uri2)](uri3) + +Expected Html +

    [foo](uri2)

    + +Actural Html +

    ![foo](uri3)

    + +``` + +**Example520** + +```markdown +Markdown content +[foo + +Expected Html +

    [foo

    + +Actural Html +

    foo <bar attr="">

    + +``` + +**Example521** + +```markdown +Markdown content +[foo\`](/uri)\` + +Expected Html +

    [foo](/uri)

    + +Actural Html +

    foo``

    + +``` + +**Example522** + +```markdown +Markdown content +[foo + +Expected Html +

    [foohttp://example.com/?search=](uri)

    + +Actural Html +

    foo<http://example.com/?search=>

    + +``` + +**Example524** + +```markdown +Markdown content +[link [foo [bar]]][ref] + +[ref]: /uri + +Expected Html +

    link [foo [bar]]

    + +Actural Html +

    [link [foo [bar]]]ref

    + +``` + +**Example528** + +```markdown +Markdown content +[foo [bar](/uri)][ref] + +[ref]: /uri + +Expected Html +

    [foo bar]ref

    + +Actural Html +

    foo bar

    + +``` + +**Example529** + +```markdown +Markdown content +[foo *bar [baz][ref]*][ref] + +[ref]: /uri + +Expected Html +

    [foo bar baz]ref

    + +Actural Html +

    foo bar baz

    + +``` + +**Example532** + +```markdown +Markdown content +[foo + +[ref]: /uri + +Expected Html +

    [foo

    + +Actural Html +

    foo <bar attr="">

    + +``` + +**Example533** + +```markdown +Markdown content +[foo\`][ref]\` + +[ref]: /uri + +Expected Html +

    [foo][ref]

    + +Actural Html +

    foo``

    + +``` + +**Example534** + +```markdown +Markdown content +[foo + +[ref]: /uri + +Expected Html +

    [foohttp://example.com/?search=][ref]

    + +Actural Html +

    foo<http://example.com/?search=>

    + +``` + +**Example569** + +```markdown +Markdown content +![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" + +Expected Html +

    foo bar

    + +Actural Html +

    foo *bar*

    + +``` + +**Example570** + +```markdown +Markdown content +![foo ![bar](/url)](/url2) + +Expected Html +

    foo bar

    + +Actural Html +

    foo ![bar](/url)

    + +``` + +**Example571** + +```markdown +Markdown content +![foo [bar](/url)](/url2) + +Expected Html +

    foo bar

    + +Actural Html +

    foo [bar](/url)

    + +``` + +**Example572** + +```markdown +Markdown content +![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" + +Expected Html +

    foo bar

    + +Actural Html +

    foo *bar*

    + +``` + +**Example573** + +```markdown +Markdown content +![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" + +Expected Html +

    foo bar

    + +Actural Html +

    foo *bar*

    + +``` + +**Example581** + +```markdown +Markdown content +![*foo* bar][] + +[*foo* bar]: /url "title" + +Expected Html +

    foo bar

    + +Actural Html +

    *foo* bar

    + +``` + +**Example585** + +```markdown +Markdown content +![*foo* bar] + +[*foo* bar]: /url "title" + +Expected Html +

    foo bar

    + +Actural Html +

    *foo* bar

    + +``` + +**Example598** + +```markdown +Markdown content + + +Expected Html +

    <http://foo.bar/baz bim>

    + +Actural Html +

    <http://foo.bar/baz bim>

    + +``` + +**Example604** + +```markdown +Markdown content +< http://foo.bar > + +Expected Html +

    < http://foo.bar >

    + +Actural Html +

    < http://foo.bar >

    + +``` + +**Example607** + +```markdown +Markdown content +http://example.com + +Expected Html +

    http://example.com

    + +Actural Html +

    http://example.com

    + +``` + +**Example608** + +```markdown +Markdown content +foo@bar.example.com + +Expected Html +

    foo@bar.example.com

    + +Actural Html +

    foo@bar.example.com

    + +``` + +**Example622** + +```markdown +Markdown content +foo + +Expected Html +

    foo <!-- not a comment -- two hyphens -->

    + +Actural Html +

    foo

    + +``` + +**Example623** + +```markdown +Markdown content +foo foo --> + +foo + +Expected Html +

    foo <!--> foo -->

    +

    foo <!-- foo--->

    + +Actural Html +

    foo <!--> foo -->

    +

    foo

    + +``` + diff --git a/test/specs/commonMark/compare.marked.md b/test/specs/commonMark/compare.marked.md new file mode 100644 index 00000000..f2f394ef --- /dev/null +++ b/test/specs/commonMark/compare.marked.md @@ -0,0 +1,275 @@ +## Compare with `marked.js` + +Marked.js failed examples count: 133 +Mark Text failed examples count: 126 + +**Example7** + +Mark Text success and marked.js fail + +```markdown +Markdown content +- foo + +Expected Html +
      +
    • +
        foo
      +
      +
    • +
    + +Actural Html +
      +
    • foo
      +
      +
    • +
    + +marked.js html +
      +
    • foo
    • +
    + +``` + +**Example40** + +Mark Text success and marked.js fail + +```markdown +Markdown content +foo + # bar + +Expected Html +

    foo +# bar

    + +Actural Html +

    foo + # bar

    + +marked.js html +

    foo

    +
    # bar
    +``` + +**Example57** + +Mark Text success and marked.js fail + +```markdown +Markdown content +Foo + --- + +Expected Html +

    Foo +---

    + +Actural Html +

    Foo + ---

    + +marked.js html +

    Foo

    + +``` + +**Example266** + +Mark Text success and marked.js fail + +```markdown +Markdown content +10) foo + - bar + +Expected Html +
      +
    1. foo +
        +
      • bar
      • +
      +
    2. +
    + +Actural Html +
      +
    1. foo
        +
      • bar
      • +
      +
    2. +
    + +marked.js html +

    10) foo + - bar

    + +``` + +**Example271** + +Mark Text success and marked.js fail + +```markdown +Markdown content +- foo +- bar ++ baz + +Expected Html +
      +
    • foo
    • +
    • bar
    • +
    +
      +
    • baz
    • +
    + +Actural Html +
      +
    • foo
    • +
    • bar
    • +
    +
      +
    • baz
    • +
    + +marked.js html +
      +
    • foo
    • +
    • bar
    • +
    • baz
    • +
    + +``` + +**Example272** + +Mark Text success and marked.js fail + +```markdown +Markdown content +1. foo +2. bar +3) baz + +Expected Html +
      +
    1. foo
    2. +
    3. bar
    4. +
    +
      +
    1. baz
    2. +
    + +Actural Html +
      +
    1. foo
    2. +
    3. bar
    4. +
    +
      +
    1. baz
    2. +
    + +marked.js html +
      +
    1. foo
    2. +
    3. bar +3) baz
    4. +
    + +``` + +**Example285** + +Mark Text fail and marked.js success + +```markdown +Markdown content +* a +* + +* c + +Expected Html +
      +
    • +

      a

      +
    • +
    • +
    • +

      c

      +
    • +
    + +Actural Html +
      +
    • a

      +
    • +
    • +
    • +
    • c

      +
    • +
    + +marked.js html +
      +
    • a

      +
    • +
    • +
    • c

      +
    • +
    + +``` + +**Example310** + +Mark Text success and marked.js fail + +```markdown +Markdown content +\`\`\` foo\+bar +foo +\`\`\` + +Expected Html +
    foo
    +
    + +Actural Html +
    foo
    +
    + +marked.js html +
    foo
    + +``` + +**Example320** + +Mark Text success and marked.js fail + +```markdown +Markdown content +\`\`\` föö +foo +\`\`\` + +Expected Html +
    foo
    +
    + +Actural Html +
    foo
    +
    + +marked.js html +
    foo
    + +``` + +There are 9 examples are different with marked.js. \ No newline at end of file diff --git a/test/specs/commonMark/run.spec.js b/test/specs/commonMark/run.spec.js new file mode 100644 index 00000000..e2d75f52 --- /dev/null +++ b/test/specs/commonMark/run.spec.js @@ -0,0 +1,100 @@ +// This file is copy from marked and modified. +import { removeCustomClass } from '../help' +import { MT_MARKED_OPTIONS } from '../config' +const fetch = require('node-fetch') +const markedJs = require('marked') +const marked = require('../../../src/muya/lib/parser/marked/index.js').default +const HtmlDiffer = require('@markedjs/html-differ').HtmlDiffer +const fs = require('fs') +const path = require('path') + +const options = { ignoreSelfClosingSlash: true, ignoreAttributes: ['id', 'class'] } + +const htmlDiffer = new HtmlDiffer(options) + +const getSpecs = async () => { + const version = await fetch('https://raw.githubusercontent.com/commonmark/commonmark.js/master/package.json') + .then(res => res.json()) + .then(pkg => pkg.version.replace(/^(\d+\.\d+).*$/, '$1')) + + return fetch(`https://spec.commonmark.org/${version}/spec.json`) + .then(res => res.json()) + .then (specs => ({ specs, version })) +} + +const getMarkedSpecs = async (version) => { + return fetch(`https://raw.githubusercontent.com/markedjs/marked/master/test/specs/commonmark/commonmark.${version}.json`) + .then(res => res.json()) +} + +export const writeResult = (version, specs, markedSpecs, type = 'commonmark') => { + let result = '## Test Result\n\n' + const totalCount = specs.length + const failedCount = specs.filter(s => s.shouldFail).length + result += `Total test ${totalCount} examples, and failed ${failedCount} examples:\n\n` + + specs.filter(s => s.shouldFail) + .forEach(spec => { + const expectedHtml = spec.html + const acturalHtml = marked(spec.markdown, MT_MARKED_OPTIONS) + result += `**Example${spec.example}**\n\n` + result += '```markdown\n' + result += `Markdown content\n` + result += `${spec.markdown.replace(/`/g, '\\`')}\n` + result += `Expected Html\n` + result += `${expectedHtml}\n` + result += `Actural Html\n` + result += `${acturalHtml}\n` + result += '```\n\n' + }) + const failedPath = type === 'commonmark' ? `./${type}.${version}.md` : `../gfm/${type}.${version}.md` + fs.writeFileSync(path.join(__dirname, failedPath), result) + // compare with markedjs + let compareResult = `## Compare with \`marked.js\`\n\n` + compareResult += `Marked.js failed examples count: ${markedSpecs.filter(s => s.shouldFail).length}\n` + compareResult += `Mark Text failed examples count: ${failedCount}\n\n` + let count = 0 + specs.forEach((spec, i) => { + if (spec.shouldFail !== markedSpecs[i].shouldFail) { + count++ + const acturalHtml = marked(spec.markdown, MT_MARKED_OPTIONS) + + compareResult += `**Example${spec.example}**\n\n` + compareResult += `Mark Text ${spec.shouldFail ? 'fail' : 'success'} and marked.js ${markedSpecs[i].shouldFail ? 'fail' : 'success'}\n\n` + compareResult += '```markdown\n' + compareResult += `Markdown content\n` + compareResult += `${spec.markdown.replace(/`/g, '\\`')}\n` + compareResult += `Expected Html\n` + compareResult += `${spec.html}\n` + compareResult += `Actural Html\n` + compareResult += `${acturalHtml}\n` + compareResult += `marked.js html\n` + compareResult += `${markedJs(spec.markdown, { headerIds: false })}\n` + compareResult += '```\n\n' + } + }) + + compareResult += `There are ${count} examples are different with marked.js.` + const comparePath = type === 'commonmark' ? `./compare.marked.md` : `../gfm/compare.marked.md` + fs.writeFileSync(path.join(__dirname, comparePath), compareResult) +} + +const diffAndGenerateResult = async () => { + const { specs, version } = await getSpecs() + const markedSpecs = await getMarkedSpecs(version) + + specs.forEach(spec => { + const html = removeCustomClass(marked(spec.markdown, MT_MARKED_OPTIONS)) + if (!htmlDiffer.isEqual(html, spec.html)) { + spec.shouldFail = true + } + }) + fs.writeFileSync(path.join(__dirname, `./commonmark.${version}.json`), JSON.stringify(specs, null, 2) + '\n') + writeResult(version, specs, markedSpecs, 'commonmark') +} + +try { + diffAndGenerateResult() +} catch (err) { + console.log(err) +} diff --git a/test/specs/config.js b/test/specs/config.js new file mode 100644 index 00000000..9ce24a90 --- /dev/null +++ b/test/specs/config.js @@ -0,0 +1,6 @@ +export const MT_MARKED_OPTIONS = { + headerIds: false, + emoji: false, + math: false, + frontMatter: false +} diff --git a/test/specs/gfm/compare.marked.md b/test/specs/gfm/compare.marked.md new file mode 100644 index 00000000..e7a61537 --- /dev/null +++ b/test/specs/gfm/compare.marked.md @@ -0,0 +1,6 @@ +## Compare with `marked.js` + +Marked.js failed examples count: 1 +Mark Text failed examples count: 1 + +There are 0 examples are different with marked.js. \ No newline at end of file diff --git a/test/specs/gfm/gfm.0.29.json b/test/specs/gfm/gfm.0.29.json new file mode 100644 index 00000000..7d1d43e4 --- /dev/null +++ b/test/specs/gfm/gfm.0.29.json @@ -0,0 +1,147 @@ +[ + { + "section": "Tables", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n
    foobar
    bazbim
    ", + "markdown": "| foo | bar |\n| --- | --- |\n| baz | bim |", + "example": 198 + }, + { + "section": "Tables", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n
    abcdefghi
    barbaz
    ", + "markdown": "| abc | defghi |\n:-: | -----------:\nbar | baz", + "example": 199 + }, + { + "section": "Tables", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    f|oo
    b | az
    b | im
    ", + "markdown": "| f\\|oo |\n| ------ |\n| b `\\|` az |\n| b **\\|** im |", + "example": 200 + }, + { + "section": "Tables", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n
    abcdef
    barbaz
    \n
    \n

    bar

    \n
    ", + "markdown": "| abc | def |\n| --- | --- |\n| bar | baz |\n> bar", + "example": 201 + }, + { + "section": "Tables", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    abcdef
    barbaz
    bar
    \n

    bar

    ", + "markdown": "| abc | def |\n| --- | --- |\n| bar | baz |\nbar\n\nbar", + "example": 202 + }, + { + "section": "Tables", + "html": "

    | abc | def |\n| --- |\n| bar |

    ", + "markdown": "| abc | def |\n| --- |\n| bar |", + "example": 203 + }, + { + "section": "Tables", + "html": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    abcdef
    bar
    barbaz
    ", + "markdown": "| abc | def |\n| --- | --- |\n| bar |\n| bar | baz | boo |", + "example": 204 + }, + { + "section": "Tables", + "html": "\n\n\n\n\n\n\n
    abcdef
    ", + "markdown": "| abc | def |\n| --- | --- |", + "example": 205 + }, + { + "section": "Task list items", + "html": "
      \n
    • foo
    • \n
    • bar
    • \n
    ", + "markdown": "- [ ] foo\n- [x] bar", + "example": 279 + }, + { + "section": "Task list items", + "html": "
      \n
    • foo\n
        \n
      • bar
      • \n
      • baz
      • \n
      \n
    • \n
    • bim
    • \n
    ", + "markdown": "- [x] foo\n - [ ] bar\n - [x] baz\n- [ ] bim", + "example": 280 + }, + { + "section": "Strikethrough", + "html": "

    Hi Hello, world!

    ", + "markdown": "~~Hi~~ Hello, world!", + "example": 491 + }, + { + "section": "Strikethrough", + "html": "

    This ~~has a

    \n

    new paragraph~~.

    ", + "markdown": "This ~~has a\n\nnew paragraph~~.", + "example": 492 + }, + { + "section": "Autolinks", + "html": "

    www.commonmark.org

    ", + "markdown": "www.commonmark.org", + "example": 621 + }, + { + "section": "Autolinks", + "html": "

    Visit www.commonmark.org/help for more information.

    ", + "markdown": "Visit www.commonmark.org/help for more information.", + "example": 622 + }, + { + "section": "Autolinks", + "html": "

    Visit www.commonmark.org.

    \n

    Visit www.commonmark.org/a.b.

    ", + "markdown": "Visit www.commonmark.org.\n\nVisit www.commonmark.org/a.b.", + "example": 623 + }, + { + "section": "Autolinks", + "html": "

    www.google.com/search?q=Markup+(business)

    \n

    (www.google.com/search?q=Markup+(business))

    ", + "markdown": "www.google.com/search?q=Markup+(business)\n\n(www.google.com/search?q=Markup+(business))", + "example": 624 + }, + { + "section": "Autolinks", + "html": "

    www.google.com/search?q=(business))+ok

    ", + "markdown": "www.google.com/search?q=(business))+ok", + "example": 625 + }, + { + "section": "Autolinks", + "html": "

    www.google.com/search?q=commonmark&hl=en

    \n

    www.google.com/search?q=commonmark&hl;

    ", + "markdown": "www.google.com/search?q=commonmark&hl=en\n\nwww.google.com/search?q=commonmark&hl;", + "example": 626 + }, + { + "section": "Autolinks", + "html": "

    www.commonmark.org/he<lp

    ", + "markdown": "www.commonmark.org/hehttp://commonmark.org

    \n

    (Visit https://encrypted.google.com/search?q=Markup+(business))

    \n

    Anonymous FTP is available at ftp://foo.bar.baz.

    ", + "markdown": "http://commonmark.org\n\n(Visit https://encrypted.google.com/search?q=Markup+(business))\n\nAnonymous FTP is available at ftp://foo.bar.baz.", + "example": 628 + }, + { + "section": "Autolinks", + "html": "

    foo@bar.baz

    ", + "markdown": "foo@bar.baz", + "example": 629 + }, + { + "section": "Autolinks", + "html": "

    hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.

    ", + "markdown": "hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.", + "example": 630 + }, + { + "section": "Autolinks", + "html": "

    a.b-c_d@a.b

    \n

    a.b-c_d@a.b.

    \n

    a.b-c_d@a.b-

    \n

    a.b-c_d@a.b_

    ", + "markdown": "a.b-c_d@a.b\n\na.b-c_d@a.b.\n\na.b-c_d@a.b-\n\na.b-c_d@a.b_", + "example": 631 + }, + { + "section": "Disallowed Raw HTML", + "html": "

    <title> <style>

    \n
    \n <xmp> is disallowed. <XMP> is also disallowed.\n
    ", + "markdown": " <style> <em>\n\n<blockquote>\n <xmp> is disallowed. <XMP> is also disallowed.\n</blockquote>", + "example": 653, + "shouldFail": true + } +] diff --git a/test/specs/gfm/gfm.0.29.md b/test/specs/gfm/gfm.0.29.md new file mode 100644 index 00000000..814f92a5 --- /dev/null +++ b/test/specs/gfm/gfm.0.29.md @@ -0,0 +1,25 @@ +## Test Result + +Total test 24 examples, and failed 1 examples: + +**Example653** + +```markdown +Markdown content +<strong> <title> <style> <em> + +<blockquote> + <xmp> is disallowed. <XMP> is also disallowed. +</blockquote> +Expected Html +<p><strong> <title> <style> <em></p> +<blockquote> + <xmp> is disallowed. <XMP> is also disallowed. +</blockquote> +Actural Html +<p><strong> <title> <style> <em></p> +<blockquote> + <xmp> is disallowed. <XMP> is also disallowed. +</blockquote> +``` + diff --git a/test/specs/gfm/run.spec.js b/test/specs/gfm/run.spec.js new file mode 100644 index 00000000..63cc0de1 --- /dev/null +++ b/test/specs/gfm/run.spec.js @@ -0,0 +1,68 @@ +// This file is copy from https://github.com/markedjs/marked/blob/master/test/specs/gfm/getSpecs.js +// And for custom use. +import { removeCustomClass } from '../help' +import { writeResult } from '../commonMark/run.spec' +import { MT_MARKED_OPTIONS } from '../config' +const fetch = require('node-fetch') +const cheerio = require('cheerio') +const marked = require('../../../src/muya/lib/parser/marked/index.js').default +const HtmlDiffer = require('@markedjs/html-differ').HtmlDiffer +const fs = require('fs') +const path = require('path') + +const options = { ignoreSelfClosingSlash: true, ignoreAttributes: ['id', 'class'] } + +const htmlDiffer = new HtmlDiffer(options) + +const getSpecs = () => { + return fetch('https://github.github.com/gfm/') + .then(res => res.text()) + .then(html => cheerio.load(html)) + .then($ => { + const version = $('.version').text().match(/\d+\.\d+/)[0] + if (!version) { + throw new Error('No version found') + } + const specs = [] + $('.extension').each((i, ext) => { + const section = $('.definition', ext).text().trim().replace(/^\d+\.\d+(.*?) \(extension\)[\s\S]*$/, '$1') + $('.example', ext).each((j, exa) => { + const example = +$(exa).attr('id').replace(/\D/g, '') + const markdown = $('.language-markdown', exa).text().trim() + const html = $('.language-html', exa).text().trim() + specs.push({ + section, + html, + markdown, + example + }) + }) + }) + + return [version, specs] + }) +} + +const getMarkedSpecs = async (version) => { + return fetch(`https://raw.githubusercontent.com/markedjs/marked/master/test/specs/gfm/gfm.${version}.json`) + .then(res => res.json()) +} + +const diffAndGenerateResult = async () => { + const [version, specs] = await getSpecs() + const markedSpecs = await getMarkedSpecs(version) + specs.forEach(spec => { + const html = removeCustomClass(marked(spec.markdown, MT_MARKED_OPTIONS)) + if (!htmlDiffer.isEqual(html, spec.html)) { + spec.shouldFail = true + } + }) + fs.writeFileSync(path.resolve(__dirname, `./gfm.${version}.json`), JSON.stringify(specs, null, 2) + '\n') + writeResult(version, specs, markedSpecs, 'gfm') +} + +try { + diffAndGenerateResult() +} catch (err) { + console.log(err) +} diff --git a/test/specs/help.js b/test/specs/help.js new file mode 100644 index 00000000..be8398d5 --- /dev/null +++ b/test/specs/help.js @@ -0,0 +1,14 @@ +export const removeCustomClass = html => { + const customClass = ['indented-code-block', 'fenced-code-block', 'task-list-item'] + customClass.forEach(className => { + if (html.indexOf(className) > -1) { + const REG_EXP = new RegExp(`class="${className}"`, 'g') + /* eslint-disable no-useless-escape */ + const REG_EXP_SIMPLE = new RegExp(className + ` \*`, 'g') + /* eslint-enable no-useless-escape */ + html = html.replace(REG_EXP, '') + .replace(REG_EXP_SIMPLE, '') + } + }) + return html +} diff --git a/yarn.lock b/yarn.lock index 57263d09..f2b3d845 100644 --- a/yarn.lock +++ b/yarn.lock @@ -137,6 +137,19 @@ resolved "https://registry.yarnpkg.com/@hfelix/keyboardevent-from-electron-accelerator/-/keyboardevent-from-electron-accelerator-1.1.1.tgz#7e1d4fd913759c381b7919cc7faf4c0c641d457c" integrity sha512-1eVkDSqoRQkF2FrPPia2EZ3310c0TvFKYvSuJbaxHpRKbI6eVHcVGKpmOSDli6Qdn3Bu0h7ozfgMZbAEBD+BLQ== +"@markedjs/html-differ@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@markedjs/html-differ/-/html-differ-2.0.1.tgz#22251369da9c376430662c963fc4f53946fd65f2" + integrity sha512-Sv1PMZ9RGt+MZqIk7p4wHiOWZo34p1s4x2AIIipmK4HeZK1Vn7Hlp+A7K73I3CQgLfvUu4ZyuU219LIal6sUrg== + dependencies: + chalk "^2.4.2" + coa "^2.0.2" + diff "1.3.2" + lodash "^4.17.11" + parse5 "1.5.1" + vow "^0.4.19" + vow-fs "^0.3.6" + "@types/clone@^0.1.30", "@types/clone@~0.1.30": version "0.1.30" resolved "http://registry.npm.taobao.org/@types/clone/download/@types/clone-0.1.30.tgz#e7365648c1b42136a59c7d5040637b3b5c83b614" @@ -147,6 +160,11 @@ resolved "https://registry.yarnpkg.com/@types/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#40363bb847cb86b2c2e1599f1398d11e8329c921" integrity sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ== +"@types/node@*": + version "11.13.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.4.tgz#f83ec3c3e05b174b7241fadeb6688267fe5b22ca" + integrity sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ== + "@types/node@^10.12.18": version "10.14.3" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.3.tgz#170a81168620d931cc3b83460be253cadd3028f1" @@ -2111,6 +2129,18 @@ check-types@^7.3.0: resolved "https://registry.yarnpkg.com/check-types/-/check-types-7.4.0.tgz#0378ec1b9616ec71f774931a3c6516fad8c152f4" integrity sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg== +cheerio@^1.0.0-rc.3: + version "1.0.0-rc.3" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6" + integrity sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA== + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.1" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash "^4.15.0" + parse5 "^3.0.1" + chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.3: version "2.1.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.2.tgz#9c23ea40b01638439e0513864d362aeacc5ad058" @@ -2771,7 +2801,7 @@ css-select-base-adapter@^0.1.1: resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== -css-select@^1.1.0: +css-select@^1.1.0, css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= @@ -3477,6 +3507,11 @@ di@^0.0.1: resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= +diff@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-1.3.2.tgz#fd07a1f1f891519d9905a4c9a89dcf5a70b66037" + integrity sha1-/Qeh8fiRUZ2ZBaTJqJ3PWnC2YDc= + diff@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -3564,7 +3599,7 @@ dom-serialize@^2.2.0: extend "^3.0.0" void-elements "^2.0.0" -dom-serializer@0: +dom-serializer@0, dom-serializer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== @@ -3959,7 +3994,7 @@ ent@~2.2.0: resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= -entities@^1.1.1: +entities@^1.1.1, entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== @@ -4257,6 +4292,11 @@ eslint@^5.16.0: table "^5.2.3" text-table "^0.2.0" +esm@^3.2.22: + version "3.2.22" + resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.22.tgz#5062c2e22fee3ccfee4e8f20da768330da90d6e3" + integrity sha512-z8YG7U44L82j1XrdEJcqZOLUnjxco8pO453gKOlaMD1/md1n/5QrscAmYG+oKUspsmDLuBFZrpbxI6aQ67yRxA== + espree@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f" @@ -4965,7 +5005,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob@7.1.3, glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1: +glob@7.1.3, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -5371,7 +5411,7 @@ html-webpack-plugin@^3.2.0: toposort "^1.0.0" util.promisify "1.0.0" -htmlparser2@^3.3.0, htmlparser2@^3.8.2, htmlparser2@^3.8.3: +htmlparser2@^3.3.0, htmlparser2@^3.8.2, htmlparser2@^3.8.3, htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== @@ -6736,7 +6776,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.0.0, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.8.0, lodash@~4.17.10: +lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.8.0, lodash@~4.17.10: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== @@ -6876,6 +6916,11 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +marked@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.2.tgz#c574be8b545a8b48641456ca1dbe0e37b6dccc1a" + integrity sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA== + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -7320,8 +7365,8 @@ node-environment-flags@1.0.4: node-fetch@^2.3.0: version "2.3.0" - resolved "http://registry.npm.taobao.org/node-fetch/download/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" - integrity sha1-Gh2UC7+5FqHT4CGfA36J5x+MX6U= + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" + integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== node-forge@0.7.5: version "0.7.5" @@ -7867,11 +7912,23 @@ parse-sel@^1.0.0: dependencies: browser-split "0.0.1" +parse5@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== +parse5@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" + integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== + dependencies: + "@types/node" "*" + parseqs@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" @@ -10695,6 +10752,11 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= +uuid@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= + uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" @@ -11280,6 +11342,28 @@ void-elements@^2.0.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= +vow-fs@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/vow-fs/-/vow-fs-0.3.6.tgz#2d4c59be22e2bf2618ddf597ab4baa923be7200d" + integrity sha1-LUxZviLivyYY3fWXq0uqkjvnIA0= + dependencies: + glob "^7.0.5" + uuid "^2.0.2" + vow "^0.4.7" + vow-queue "^0.4.1" + +vow-queue@^0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/vow-queue/-/vow-queue-0.4.3.tgz#4ba8f64b56e9212c0dbe57f1405aeebd54cce78d" + integrity sha512-/poAKDTFL3zYbeQg7cl4BGcfP4sGgXKrHnRFSKj97dteUFu8oyXMwIcdwu8NSx/RmPGIuYx1Bik/y5vU4H/VKw== + dependencies: + vow "^0.4.17" + +vow@^0.4.17, vow@^0.4.19, vow@^0.4.7: + version "0.4.19" + resolved "https://registry.yarnpkg.com/vow/-/vow-0.4.19.tgz#cc5ef4d6bb6972d830830a7c9ecf8ad834a7c525" + integrity sha512-S+0+CiQlbUhTNWMlJdqo/ARuXOttXdvw5ACGyh1W97NFHUdwt3Fzyaus03Kvdmo733dwnYS9AGJSDg0Zu8mNfA== + vscode-windows-registry@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/vscode-windows-registry/-/vscode-windows-registry-1.0.1.tgz#bc9f765563eb6dc1c9ad9a41f9eaacc84dfadc7c"