[
  {
    "path": ".eslintignore",
    "content": "node_modules/\ncoverage/\ntmp/\n\n"
  },
  {
    "path": ".eslintrc",
    "content": "{\n  \"extends\": \"hexo\",\n  \"root\": true\n}\n\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n*        text=auto\n\n*.cs     text diff=csharp\n*.java   text diff=java\n*.html   text diff=html\n*.css    text\n*.js     text\n\n\n# absolute paths are ok, as are globs\ntest/**/* text eol=lf\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n- package-ecosystem: npm\n  directory: \"/\"\n  schedule:\n    interval: monthly\n  ignore:\n    - dependency-name: \"*\"\n      update-types: [\"version-update:semver-patch\"]\n  open-pull-requests-limit: 3\n"
  },
  {
    "path": ".github/workflows/tester.yml",
    "content": "name: Tester\n\non: [push, pull_request]\n\njobs:\n  tester:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        os: [ubuntu-latest, windows-latest, macos-latest]\n        node-version: ['14.x', '16.x', '18.x']\n      fail-fast: false\n    steps:\n      - uses: actions/checkout@v3\n      - name: Use Node.js ${{ matrix.node-version }}\n        uses: actions/setup-node@v3\n        with:\n          node-version: ${{ matrix.node-version }}\n      - name: Cache NPM dependencies\n        uses: actions/cache@v1\n        with:\n          path: node_modules\n          key: ${{ runner.os }}-npm-cache\n          restore-keys: ${{ runner.os }}-npm-cache\n      - name: Install Dependencies\n        run: npm install\n      - name: Test\n        run: npm run test\n        env:\n          CI: true\n  coverage:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        os: [ubuntu-latest]\n        node-version: ['14.x']\n    steps:\n      - uses: actions/checkout@v3\n      - name: Use Node.js ${{ matrix.node-version }}\n        uses: actions/setup-node@v3\n        with:\n          node-version: ${{ matrix.node-version }}\n      - name: Cache NPM dependencies\n        uses: actions/cache@v1\n        with:\n          path: node_modules\n          key: ${{ runner.os }}-npm-cache\n          restore-keys: ${{ runner.os }}-npm-cache\n      - name: Install Dependencies\n        run: npm install\n      - name: Coverage\n        run: npm run test-cov\n        env:\n          CI: true\n      - name: Coveralls\n        uses: coverallsapp/github-action@master\n        with:\n          github-token: ${{ secrets.github_token }}"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\nnode_modules/\ntmp/\n*.log\n.idea/\ncoverage/\npackage-lock.json\n"
  },
  {
    "path": ".mocharc.yml",
    "content": "color: true\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2015 Celso Miranda\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# hexo-renderer-markdown-it\n\n[![Build Status](https://github.com/hexojs/hexo-renderer-markdown-it/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-renderer-markdown-it/actions?query=workflow%3ATester)\n[![npm version](https://badge.fury.io/js/hexo-renderer-markdown-it.svg)](https://www.npmjs.com/package/hexo-renderer-markdown-it)\n[![Coverage Status](https://coveralls.io/repos/github/hexojs/hexo-renderer-markdown-it/badge.svg?branch=master)](https://coveralls.io/github/hexojs/hexo-renderer-markdown-it?branch=master)\n\nThis renderer plugin uses [Markdown-it] as a render engine on [Hexo]. Adds support for [Markdown] and [CommonMark].\n\n## Main Features\n\n- Support for [Markdown], [GFM] and [CommonMark]\n- Extensive configuration\n- Faster than the default renderer | `hexo-renderer-marked`\n- Safe ID for headings\n- Anchors for headings with ID\n- Footnotes\n- `<sub>` H<sub>2</sub>O\n- `<sup>` x<sup>2</sup>\n- `<ins>` <ins>Inserted</ins>\n\n## Installation\n\n**Warning:** make sure you're inside the main hexo directory before starting this guide.\n\nA default Hexo installation will include a markdown renderer plugin which uses `marked`, so you will have to remove it if you want to use `hexo-renderer-markdown-it`.\n\n``` sh\n$ npm un hexo-renderer-marked --save\n```\n\nIf you have already removed the default renderer, and others you might of added, you can now safely install `hexo-renderer-markdown-it`\n\n``` sh\n$ npm i hexo-renderer-markdown-it --save\n```\n\n## Options\n\n``` yml\nmarkdown:\n  preset: 'default'\n  render:\n    html: true\n    xhtmlOut: false\n    langPrefix: 'language-'\n    breaks: true\n    linkify: true\n    typographer: true\n    quotes: '“”‘’'\n  enable_rules:\n  disable_rules:\n  plugins:\n  anchors:\n    level: 2\n    collisionSuffix: ''\n    permalink: false\n    permalinkClass: 'header-anchor'\n    permalinkSide: 'left'\n    permalinkSymbol: '¶'\n    case: 0\n    separator: '-'\n  images:\n    lazyload: false\n    prepend_root: false\n    post_asset: false\n  inline: false  # https://markdown-it.github.io/markdown-it/#MarkdownIt.renderInline\n```\n\nSee below for more details.\n\n## Advanced Configuration\n\n### [Preset](https://markdown-it.github.io/markdown-it/#MarkdownIt.new) options\n\n``` yml\nmarkdown:\n  preset: 'default'\n```\n\n- **\"commonmark\"** - configures parser to strict [CommonMark](https://commonmark.org/) mode.\n- **\"default\"** - similar to [GFM](https://github.github.com/gfm/), used when no preset name given. Enables all available rules, but still without html, typographer & autolinker.\n- **\"zero\"** - all rules disabled. Useful to quickly setup your config via `.enable()`. For example, when you need only `bold` and `italic` markup and nothing else.\n\nNote that the [default](https://github.com/hexojs/hexo-renderer-markdown-it#options) render and anchor options override some options in the preset. If you prefer to have the preset only:\n\n``` yml\nmarkdown:\n  preset: 'default'\n  render:\n  anchors:\n```\n\n### Render options\n\n#### html\n\nThe `html` setting defines whether or not HTML content inside the document should be escaped or passed to the final result.\n\n``` yaml\nhtml: true # Doesn't escape HTML content\n    ## OR\nhtml: false # Escapes HTML content so the tags will appear as text.\n```\n\n#### xhtmlOut\n\nThe `xhtmlOut` setting defines whether the parser will export fully XHTML compatible tags. This only needs to be `true` for complete [CommonMark] support.\n\n``` yaml\nxhtmlOut: true # Parser produces fully XHTML compliant code.\n               # Ex: A line breaks will be <br />\n    ## OR\nxhtmlOut: false # Parser will not produce XHTML compliant code.\n                # Ex: A line break will be <br>\n```\n\n#### breaks\n\nMakes line breaks in the source file will be parsed into `<br>` tags. So every time you press the `Enter` key you will create a line break, which is not the default Markdown, CommonMark, or GFM behaviour.\n\n``` yaml\nbreaks: true # Parser produces `<br>` tags every time there is a line break in the source document.\n    ## OR\nbreaks: false # Parser will ignore line breaks in the source document.\n              #Default double line break creates paragraph is still supported\n```\n\n#### langPrefix\n\nAdd a prefix to the class name of code blocks (when a language is specified).\n\n``` yaml\nlangPrefix: 'language-' # default\n```\n\n_This option only applies when both Hexo's built-in highlighters are [**disabled**](https://hexo.io/docs/syntax-highlight#Disabled)._\n\n**Example:**\n\n``` yml\nlangPrefix: 'lang-'\n```\n\nSource:\n````\n``` js\nexample\n```\n````\n\nHTML:\n\n```html\n<pre>\n<code class=\"lang-js\">example</code>\n</pre>\n```\n\n#### linkify\n\nThe parser has the ability to inline links pasted directly into the text. If you write a piece of text that looks like a link it will be rendered as `<a src=\"http://example.com\">http://example.com</a>`.\n\n``` yaml\nlinkify: true # Returns text links as proper links inlined with the paragraph.\n    ## OR\nlinkify: false # Returns text links as text.\n```\n\n#### typographer\n\nThis is enables the substitution for common typography elements like &copy;, curly quotes, dashes, etc.\n\n``` yaml\ntypographer: true # Substitution of common typographical elements will take place.\n    ## OR\ntypographer: false # No substitution, so dumb quotes will remain dumb quotes, etc.\n```\n\n#### quotes\n\nDefines the double and single quotes used for substituting dumb quotes if typographer is set to `true`.\n\n``` yaml\nquotes: '“”‘’' # \"double\" will be turned into “single”\n               # 'single' will be turned into ‘single’\n    ## OR\nquotes: '«»“”' # \"double\" will be turned into «single»\n               # 'single' will be turned into “single”\n```\n\n#### Example configuration\n\n``` yaml\nmarkdown:\n  render:\n    html: true\n    xhtmlOut: false\n    breaks: false\n    linkify: true\n    typographer: true\n    quotes: '“”‘’'\n```\n\n### Manage rules\n\nCertain rules are enabled or disabled depending on the [preset](#preset-options). For example, \"zero\" preset disables all rules, to enable specific rules:\n\n``` yml\nmarkdown:\n  preset: 'zero'\n\n  # Single rule\n  enable_rules: 'link'\n\n  # Multiple rules\n  enable_rules:\n    - 'link'\n    - 'image'\n```\n\n\"default\" preset enables all rules, to disable specific rules:\n\n``` yml\nmarkdown:\n  preset: 'default'\n\n  # Single rule\n  disable_rules: 'link'\n\n  # Multiple rules\n  disable_rules:\n    - 'link'\n    - 'image'\n```\n\n#### Available rules\n\nSince the rules are subject to change, it's better to check the Markdown-it's source code for up-to-date rules. Look for the `_rules` variable in the following files:\n- [parser_block.js](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_block.js)\n- [parser_core.js](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_core.js)\n- [parser_inline.js](https://github.com/markdown-it/markdown-it/blob/master/lib/parser_inline.js)\n\n### Automatic Headline ID's\n\nEnables you to automatically create ID's for the headings so you can link back to them. A valid html document cannot have two elements with duplicate id value, for example if `title` id is already used, subsequent `title` values will be updated to `title-2`, `title-3` and so on.\n\nDefault options:\n\n``` yaml\nmarkdown:\n  anchors:\n    # Minimum level for ID creation. (Ex. h2 to h6)\n    level: 2\n    # A suffix that is prepended to the number given if the ID is repeated.\n    collisionSuffix: ''\n    # If `true`, creates an anchor tag with a permalink besides the heading.\n    permalink: false\n    # Class used for the permalink anchor tag.\n    permalinkClass: header-anchor\n    # Set to 'right' to add permalink after heading\n    permalinkSide: 'left'\n    # The symbol used to make the permalink\n    permalinkSymbol: ¶\n    # Transform anchor to (1) lower case; (2) upper case\n    case: 0\n    # Replace space with a character\n    separator: '-'\n```\n\n### Plugins\n\nIncluded plugins:\n- markdown-it-abbr\n- markdown-it-attrs\n- markdown-it-cjk-breaks\n- markdown-it-container\n- markdown-it-deflist\n- markdown-it-emoji\n- markdown-it-footnote\n- markdown-it-ins\n- markdown-it-mark\n- markdown-it-sub\n- markdown-it-sup\n\nPlugins are not enabled by default, to enable:\n\n``` yaml\nmarkdown:\n  plugins:\n    - markdown-it-abbr\n    # installed external plugins also can be enabled\n    - markdown-it-table-of-contents\n```\n\n#### Plugin option\n\n``` yaml\nmarkdown:\n  plugins:\n    - name: 'markdown-it-emoji'\n      options:\n        shortcuts:\n          laughing: ':D'\n    - name: 'other-plugin'\n      options: ...\n```\n\n## Extensibility\n\nThis plugin overrides some default behaviors of how markdown-it plugin renders the markdown into html, to integrate with the Hexo ecosystem. It is possible to override this plugin too, without resorting to forking the whole thing.\n\nFor example, to enable [unsafe links](https://markdown-it.github.io/markdown-it/#MarkdownIt.prototype.validateLink) (which is disabled by default):\n\n``` js\nhexo.extend.filter.register('markdown-it:renderer', function(md) {\n  const { config } = this; // Optional, parse user config from _config.yml\n  md.validateLink = function() { return true; };\n});\n\n// Specify custom function in plugin option\nconst { slugize } = require('hexo-util');\nconst opts = hexo.config.markdown.anchors;\nconst mdSlugize = (str) => {\n  return slugize(str, { transform: opts.case, ...opts });\n};\n\nhexo.extend.filter.register('markdown-it:renderer', function(md) {\n  md.use(require('markdown-it-table-of-contents'), {\n    includeLevel: [2,3,4],\n    slugify: mdSlugize\n  });\n});\n```\n\nSave the file in \"scripts/\" folder and run Hexo as usual.\n\nRefer to markdown-it [API documentation](https://markdown-it.github.io/markdown-it/#MarkdownIt).\n\n## Frequently Asked Questions\n\n### Missing Styles of GFM Task Lists\n\nIn general, adding the following styles to the theme can solve the problem.\n\n```css\nli.task-list-item {\n  list-style-type: none;\n}\n\nli.task-list-item .task-list-item-checkbox {\n  margin: 0 0.2em 0.25em -1.6em;\n}\n```\n\n### How can I add math support?\n\nFirst, install KaTeX plugin for markdown-it.\n\n```bash\nnpm install katex @renbaoshuo/markdown-it-katex\n```\n\nThen add [`@renbaoshuo/markdown-it-katex`](https://github.com/renbaoshuo/markdown-it-katex) to plugins list.\n\n```yaml\nplugins:\n  - '@renbaoshuo/markdown-it-katex'\n  # Other plugins...\n```\n\nIf you need to allow spaces before and after delimiters (e.g. `$ 1 + 1 = 2 $`), set the `skipDelimitersCheck` option to `true`:\n\n```yaml\nplugins:\n  - name: '@renbaoshuo/markdown-it-katex'\n    options:\n      skipDelimitersCheck: true\n```\n\nDon't forget to include the KaTeX stylesheet in your html:\n\n```html\n<link\n  rel=\"stylesheet\"\n  href=\"https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css\"\n/>\n```\n\n### How can I merge table cells with the same content?\n\nInstall the [`markdown-it-merge-cells`](https://github.com/Menci/markdown-it-merge-cells) plugin.\n\n```bash\nnpm install markdown-it-merge-cells\n```\n\nThen add the plugin to plugins list.\n\n```yaml\nplugins:\n  - markdown-it-merge-cells\n  # Other plugins...\n```\n\n## Requests and bug reports\n\nIf you have any feature requests or bugs to report, you're welcome to [file an issue](https://github.com/hexojs/hexo-renderer-markdown-it/issues).\n\n\n[CommonMark]: http://commonmark.org/\n[Markdown]: http://daringfireball.net/projects/markdown/\n[GFM]: https://help.github.com/articles/github-flavored-markdown/\n[Markdown-it]: https://github.com/markdown-it/markdown-it\n[Hexo]: http://hexo.io/\n"
  },
  {
    "path": "index.js",
    "content": "/* global hexo */\n\n'use strict';\n\nhexo.config.markdown = Object.assign({\n  preset: 'default',\n  render: {},\n  anchors: {}\n}, hexo.config.markdown);\n\nhexo.config.markdown.render = Object.assign({\n  html: true,\n  xhtmlOut: false,\n  breaks: true,\n  linkify: true,\n  typographer: true,\n  quotes: '“”‘’'\n}, hexo.config.markdown.render);\n\nhexo.config.markdown.anchors = Object.assign({\n  level: 2,\n  collisionSuffix: '',\n  permalink: false,\n  permalinkClass: 'header-anchor',\n  permalinkSide: 'left',\n  permalinkSymbol: '¶',\n  case: 0,\n  separator: '-'\n}, hexo.config.markdown.anchors);\n\nconst Renderer = require('./lib/renderer');\nconst renderer = new Renderer(hexo);\n\nrenderer.disableNunjucks = Boolean(hexo.config.markdown.disableNunjucks);\n\nfunction render(data, options) {\n  return renderer.render(data, options);\n}\n\nhexo.extend.renderer.register('md', 'html', render, true);\nhexo.extend.renderer.register('markdown', 'html', render, true);\nhexo.extend.renderer.register('mkd', 'html', render, true);\nhexo.extend.renderer.register('mkdn', 'html', render, true);\nhexo.extend.renderer.register('mdwn', 'html', render, true);\nhexo.extend.renderer.register('mdtxt', 'html', render, true);\nhexo.extend.renderer.register('mdtext', 'html', render, true);\n"
  },
  {
    "path": "lib/anchors.js",
    "content": "'use strict';\n\nconst Token = require('markdown-it/lib/token');\nconst { slugize } = require('hexo-util');\n\nconst renderPermalink = function(slug, opts, tokens, idx) {\n  const permalink = [Object.assign(new Token('link_open', 'a', 1), {\n    attrs: [['class', opts.permalinkClass], ['href', '#' + slug]]\n  }), Object.assign(new Token('text', '', 0), {\n    content: opts.permalinkSymbol\n  }), new Token('link_close', 'a', -1), Object.assign(new Token('text', '', 0), {\n    content: ''\n  })];\n\n  if (opts.permalinkSide === 'right') {\n    return tokens[idx + 1].children.push(...permalink);\n  }\n\n  return tokens[idx + 1].children.unshift(...permalink);\n};\n\nconst anchor = function(md, opts) {\n  Object.assign(opts, { renderPermalink });\n\n  let titleStore = {};\n  const originalHeadingOpen = md.renderer.rules.heading_open;\n  const slugOpts = { transform: opts.case, ...opts };\n\n  md.renderer.rules.heading_open = function(...args) {\n    const [tokens, idx, something, somethingelse, self] = args; // eslint-disable-line no-unused-vars\n\n    if (tokens[idx].tag.substr(1) >= opts.level) {\n      let _tokens$idx;\n\n      const title = tokens[idx + 1].children.reduce((acc, t) => {\n        return acc + t.content;\n      }, '');\n\n      let slug = slugize(title, slugOpts);\n\n      if (Object.prototype.hasOwnProperty.call(titleStore, slug)) {\n        titleStore[slug] = titleStore[slug] + 1;\n        slug = slug + '-' + opts.collisionSuffix + titleStore[slug].toString();\n      } else {\n        titleStore[slug] = 1;\n      }\n\n\n      (_tokens$idx = tokens[idx], !_tokens$idx.attrs && (_tokens$idx.attrs = []), _tokens$idx.attrs)\n        .push(['id', slug]);\n\n      if (opts.permalink) {\n        opts.renderPermalink.apply(opts, [slug, opts].concat(args));\n      }\n    }\n\n    return originalHeadingOpen\n      ? originalHeadingOpen.apply(this, args)\n      : self.renderToken.apply(self, args);\n  };\n\n  md.core.ruler.push('clear_anchor_title_store', () => {\n    titleStore = {};\n  });\n};\n\nmodule.exports = anchor;\n"
  },
  {
    "path": "lib/images.js",
    "content": "'use strict';\n\nconst { join, relative: relativePosix } = require('path').posix;\nconst { relative, basename, extname, dirname, isAbsolute } = require('path');\nconst { url_for } = require('hexo-util');\n\nfunction images(md, opts) {\n  const { hexo, images } = opts;\n  const { lazyload, prepend_root: prependRoot, post_asset: postAsset } = images;\n  const { relative_link, model, base_dir, source_dir } = hexo;\n\n  md.renderer.rules.image = function(tokens, idx, options, env, self) {\n    const token = tokens[idx];\n    const { postPath } = env;\n\n    token.attrSet('alt', token.content);\n\n    if (lazyload) {\n      token.attrSet('loading', 'lazy');\n    }\n\n    if (!prependRoot && !postAsset) {\n      return self.renderToken(tokens, idx, options);\n    }\n\n    const srcIdx = token.attrs.findIndex(attr => attr[0] === 'src');\n    let src = token.attrs[srcIdx][1];\n    if (!/^(#|\\/\\/|http(s)?:)/.test(src) && !relative_link) {\n      if (!(src.startsWith('/') || src.startsWith('\\\\')) && postAsset) {\n        const PostAsset = model.call(hexo, 'PostAsset');\n        let assetDirBasePath = join(basename(source_dir), dirname(relativePosix(source_dir, postPath)), basename(postPath, extname(postPath)));\n        if (isAbsolute(assetDirBasePath)) assetDirBasePath = relative(base_dir, assetDirBasePath);\n        assetDirBasePath = assetDirBasePath.replace(/\\\\/g, '/');\n\n        const asset = [\n          join(assetDirBasePath, src),\n          join(assetDirBasePath, src.replace(new RegExp('^' + basename(postPath, extname(postPath)) + '/'), ''))\n        ]\n          .map(id => PostAsset.findById(id))\n          .filter(Boolean);\n\n        if (asset.length) {\n          src = asset[0].path.replace(/\\\\/g, '/');\n        }\n      }\n\n      token.attrSet('src', url_for.call(hexo, src));\n    }\n\n    return self.renderToken(tokens, idx, options);\n  };\n}\n\nmodule.exports = images;\n"
  },
  {
    "path": "lib/renderer.js",
    "content": "'use strict';\n\nconst MarkdownIt = require('markdown-it');\nconst path = require('path');\n\nclass Renderer {\n  /**\n   * constructor\n   *\n   * @param {*} hexo context of hexo\n   */\n  constructor(hexo) {\n    this.hexo = hexo;\n\n    let { markdown } = hexo.config;\n\n    // Temporary backward compatibility\n    if (typeof markdown === 'string') {\n      markdown = {\n        preset: markdown,\n      };\n      hexo.log.warn(\n        `Deprecated config detected. Please use\\n\\nmarkdown:\\n  preset: ${markdown.preset}\\n\\nSee https://github.com/hexojs/hexo-renderer-markdown-it#options`\n      );\n    }\n\n    const { preset, render, enable_rules, disable_rules, plugins, anchors, images } = markdown;\n    this.parser = new MarkdownIt(preset, render);\n\n    if (enable_rules) {\n      this.parser.enable(enable_rules);\n    }\n\n    if (disable_rules) {\n      this.parser.disable(disable_rules);\n    }\n\n    if (plugins) {\n      this.parser = plugins.reduce((parser, pugs) => {\n        if (pugs instanceof Object && pugs.name) {\n          const resolved = require.resolve(pugs.name, {\n            paths: [\n              // find from root hexo base directory node_modules\n              path.join(hexo.base_dir, 'node_modules'),\n              // find from current installed library node_modules\n              path.join(__dirname, '../node_modules'),\n              // find from root hexo base directory\n              hexo.base_dir,\n              // find from current library directory\n              path.join(__dirname, '../'),\n            ],\n          });\n          return parser.use(require(resolved), pugs.options);\n        }\n        return parser.use(require(pugs));\n      }, this.parser);\n    }\n\n    if (anchors) {\n      this.parser.use(require('./anchors'), anchors);\n    }\n\n    if (images) {\n      this.parser.use(require('./images'), {\n        images,\n        hexo: this.hexo,\n      });\n    }\n  }\n\n  render(data, options) {\n    this.hexo.execFilterSync('markdown-it:renderer', this.parser, { context: this });\n\n    if (options != null && options.inline === true) {\n      return this.parser.renderInline(data.text, {\n        postPath: data.path\n      });\n    }\n    return this.parser.render(data.text, {\n      postPath: data.path,\n    });\n  }\n}\n\nmodule.exports = Renderer;\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"hexo-renderer-markdown-it\",\n  \"version\": \"7.1.1\",\n  \"description\": \"Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"eslint\": \"eslint .\",\n    \"test\": \"mocha test/index.js\",\n    \"test-cov\": \"c8 --reporter=lcovonly npm run test\"\n  },\n  \"repository\": \"hexojs/hexo-renderer-markdown-it\",\n  \"keywords\": [\n    \"hexo\",\n    \"renderer\",\n    \"markdown\",\n    \"markdown-it\",\n    \"hexo-renderer\"\n  ],\n  \"directories\": {\n    \"lib\": \"./lib\"\n  },\n  \"files\": [\n    \"index.js\",\n    \"lib/\"\n  ],\n  \"author\": \"Celso Miranda <contacto@celsomiranda.net> (http://celsomiranda.net/)\",\n  \"maintainers\": [\n    \"Hexo Core Team (https://github.com/orgs/hexojs/teams/core)\"\n  ],\n  \"license\": \"MIT\",\n  \"bugs\": \"https://github.com/hexojs/hexo-renderer-markdown-it/issues\",\n  \"homepage\": \"https://github.com/hexojs/hexo-renderer-markdown-it\",\n  \"dependencies\": {\n    \"hexo-util\": \"^3.0.1\",\n    \"markdown-it\": \"^13.0.1\",\n    \"markdown-it-abbr\": \"^1.0.4\",\n    \"markdown-it-attrs\": \"^4.1.3\",\n    \"markdown-it-cjk-breaks\": \"^1.1.2\",\n    \"markdown-it-container\": \"^3.0.0\",\n    \"markdown-it-deflist\": \"^2.0.3\",\n    \"markdown-it-emoji\": \"^2.0.0\",\n    \"markdown-it-footnote\": \"^3.0.1\",\n    \"markdown-it-ins\": \"^3.0.0\",\n    \"markdown-it-mark\": \"^3.0.0\",\n    \"markdown-it-sub\": \"^1.0.0\",\n    \"markdown-it-sup\": \"^1.0.0\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.3.7\",\n    \"eslint\": \"^8.41.0\",\n    \"eslint-config-hexo\": \"^5.0.0\",\n    \"hexo\": \"^7.0.0\",\n    \"mocha\": \"^10.2.0\",\n    \"c8\": \"^8.0.1\"\n  },\n  \"engines\": {\n    \"node\": \">=14\"\n  }\n}\n"
  },
  {
    "path": "test/.eslintrc",
    "content": "{\n  \"extends\": \"hexo/test\"\n}\n\n"
  },
  {
    "path": "test/fixtures/markdownit.md",
    "content": "# h1 Heading em português\n## h2 Heading :P\n### h3 Heading\n#### h4 Heading\n##### h5 Heading\n###### h6 Heading\n\n\n## Horizontal Rule\n\n___\n\n## Horizontal Rule\n\n---\n\n## Horizontal Rule\n\n***\n\n\n## Typographic replacements\n\nEnable typographer option to see result.\n\n(c) (C) (r) (R) (tm) (TM) +-\n\ntest.. test... test..... test?..... test!....\n\n!!!!!! ???? ,,  -- ---\n\n\"Smartypants, double quotes\" and 'single quotes'\n\n\n## Emphasis\n\n**This is bold text**\n\n__This is bold text__\n\n*This is italic text*\n\n_This is italic text_\n\n~~Strikethrough~~\n\n\n## Blockquotes\n\n\n> Blockquotes can also be nested...\n>> ...by using additional greater-than signs right next to each other...\n> > > ...or with spaces between arrows.\n\n\n## Lists\n\nUnordered\n\n+ Create a list by starting a line with `+`, `-`, or `*`\n+ Sub-lists are made by indenting 2 spaces:\n  - Marker character change forces new list start:\n    * Ac tristique libero volutpat at\n    + Facilisis in pretium nisl aliquet\n    - Nulla volutpat aliquam velit\n+ Very easy!\n\nOrdered\n\n1. Lorem ipsum dolor sit amet\n2. Consectetur adipiscing elit\n3. Integer molestie lorem at massa\n\n\n\n## Code\n\nInline `code`\n\nIndented code\n\n    // Some comments\n    line 1 of code\n    line 2 of code\n    line 3 of code\n\n\nBlock code \"fences\"\n\n```\nSample text here...\n```\n\nSyntax highlighting\n\n``` js\nvar foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n```\n\n## Tables\n\n| Option | Description |\n| ------ | ----------- |\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |\n\nRight aligned columns\n\n| Option | Description |\n| ------:| -----------:|\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |\n\n\n## Links\n\n[link text](http://dev.nodeca.com)\n\nAutoconverted link https://github.com/nodeca/pica (enable linkify to see)\n\n\n## Images\n\n![Minion](https://octodex.github.com/images/minion.png)\n![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg \"The Stormtroopocat\")\n\n![Alt text][id]\n\n[id]: https://octodex.github.com/images/dojocat.jpg  \"The Dojocat\"\n\n\n## Plugins\n\nThe killer feature of `markdown-it` is very effective support of\n[syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin).\n\n\n### [Emojies](https://github.com/markdown-it/markdown-it-emoji)\n\n> Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:\n>\n> Shortcuts (emoticons): :-) :-( 8-) ;)\n\nsee [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji.\n\n\n### [Subscipt](https://github.com/markdown-it/markdown-it-sub) / [Superscirpt](https://github.com/markdown-it/markdown-it-sup)\n\n- 19^th^\n- H~2~O\n\n\n### [\\<ins>](https://github.com/markdown-it/markdown-it-ins)\n\n++Inserted text++\n\n\n### [\\<mark>](https://github.com/markdown-it/markdown-it-mark)\n\n==Marked text==\n\n\n### [Footnotes](https://github.com/markdown-it/markdown-it-footnote)\n\nFootnote 1 link[^first].\n\nFootnote 2 link[^second].\n\nInline footnote^[Text of inline footnote] definition.\n\nDuplicated footnote reference[^second].\n\n[^first]: Footnote **can have markup**\n\n    and multiple paragraphs.\n\n[^second]: Footnote text.\n\n\n### [Definition lists](https://github.com/markdown-it/markdown-it-deflist)\n\nTerm 1\n\n:   Definition 1\nwith lazy continuation.\n\nTerm 2 with *inline markup*\n\n:   Definition 2\n\n        { some code, part of Definition 2 }\n\n    Third paragraph of definition 2.\n\n_Compact style:_\n\nTerm 1\n  ~ Definition 1\n\nTerm 2\n  ~ Definition 2a\n  ~ Definition 2b\n\n\n### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr)\n\nThis is HTML abbreviation example.\n\nIt converts \"HTML\", but keep intact partial entries like \"xxxHTMLyyy\" and so on.\n\n*[HTML]: Hyper Text Markup Language\n\n### [Custom containers](https://github.com/markdown-it/markdown-it-container)\n\n::: warning\n*here be dragons*\n:::\n\n### [Attributes](https://github.com/arve0/markdown-it-attrs) { data-attr=true }\n\nThis is an attribute example.\n"
  },
  {
    "path": "test/fixtures/outputs/anchors.html",
    "content": "<h1>h1 Heading em português</h1>\n<h2 id=\"h2-Heading-P\"><a class=\"header-anchor\" href=\"#h2-Heading-P\">¶</a>h2 Heading :P</h2>\n<h3 id=\"h3-Heading\"><a class=\"header-anchor\" href=\"#h3-Heading\">¶</a>h3 Heading</h3>\n<h4 id=\"h4-Heading\"><a class=\"header-anchor\" href=\"#h4-Heading\">¶</a>h4 Heading</h4>\n<h5 id=\"h5-Heading\"><a class=\"header-anchor\" href=\"#h5-Heading\">¶</a>h5 Heading</h5>\n<h6 id=\"h6-Heading\"><a class=\"header-anchor\" href=\"#h6-Heading\">¶</a>h6 Heading</h6>\n<h2 id=\"Horizontal-Rule\"><a class=\"header-anchor\" href=\"#Horizontal-Rule\">¶</a>Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-ver2\"><a class=\"header-anchor\" href=\"#Horizontal-Rule-ver2\">¶</a>Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-ver3\"><a class=\"header-anchor\" href=\"#Horizontal-Rule-ver3\">¶</a>Horizontal Rule</h2>\n<hr>\n<h2 id=\"Typographic-replacements\"><a class=\"header-anchor\" href=\"#Typographic-replacements\">¶</a>Typographic replacements</h2>\n<p>Enable typographer option to see result.</p>\n<p>© © ® ® ™ ™ ±</p>\n<p>test… test… test… test?.. test!..</p>\n<p>!!! ??? ,  – —</p>\n<p>“Smartypants, double quotes” and ‘single quotes’</p>\n<h2 id=\"Emphasis\"><a class=\"header-anchor\" href=\"#Emphasis\">¶</a>Emphasis</h2>\n<p><strong>This is bold text</strong></p>\n<p><strong>This is bold text</strong></p>\n<p><em>This is italic text</em></p>\n<p><em>This is italic text</em></p>\n<p><s>Strikethrough</s></p>\n<h2 id=\"Blockquotes\"><a class=\"header-anchor\" href=\"#Blockquotes\">¶</a>Blockquotes</h2>\n<blockquote>\n<p>Blockquotes can also be nested…</p>\n<blockquote>\n<p>…by using additional greater-than signs right next to each other…</p>\n<blockquote>\n<p>…or with spaces between arrows.</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<h2 id=\"Lists\"><a class=\"header-anchor\" href=\"#Lists\">¶</a>Lists</h2>\n<p>Unordered</p>\n<ul>\n<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>\n<li>Sub-lists are made by indenting 2 spaces:\n<ul>\n<li>Marker character change forces new list start:\n<ul>\n<li>Ac tristique libero volutpat at</li>\n</ul>\n<ul>\n<li>Facilisis in pretium nisl aliquet</li>\n</ul>\n<ul>\n<li>Nulla volutpat aliquam velit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Very easy!</li>\n</ul>\n<p>Ordered</p>\n<ol>\n<li>Lorem ipsum dolor sit amet</li>\n<li>Consectetur adipiscing elit</li>\n<li>Integer molestie lorem at massa</li>\n</ol>\n<h2 id=\"Code\"><a class=\"header-anchor\" href=\"#Code\">¶</a>Code</h2>\n<p>Inline <code>code</code></p>\n<p>Indented code</p>\n<pre><code>// Some comments\nline 1 of code\nline 2 of code\nline 3 of code\n</code></pre>\n<p>Block code “fences”</p>\n<pre><code>Sample text here...\n</code></pre>\n<p>Syntax highlighting</p>\n<pre><code class=\"language-js\">var foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n</code></pre>\n<h2 id=\"Tables\"><a class=\"header-anchor\" href=\"#Tables\">¶</a>Tables</h2>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>data</td>\n<td>path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td>engine</td>\n<td>engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td>ext</td>\n<td>extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<p>Right aligned columns</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:right\">Option</th>\n<th style=\"text-align:right\">Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:right\">data</td>\n<td style=\"text-align:right\">path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">engine</td>\n<td style=\"text-align:right\">engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">ext</td>\n<td style=\"text-align:right\">extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"Links\"><a class=\"header-anchor\" href=\"#Links\">¶</a>Links</h2>\n<p><a href=\"http://dev.nodeca.com\">link text</a></p>\n<p>Autoconverted link <a href=\"https://github.com/nodeca/pica\">https://github.com/nodeca/pica</a> (enable linkify to see)</p>\n<h2 id=\"Images\"><a class=\"header-anchor\" href=\"#Images\">¶</a>Images</h2>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\"><br>\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\"></p>\n<p><img src=\"https://octodex.github.com/images/dojocat.jpg\" alt=\"Alt text\" title=\"The Dojocat\"></p>\n<h2 id=\"Plugins\"><a class=\"header-anchor\" href=\"#Plugins\">¶</a>Plugins</h2>\n<p>The killer feature of <code>markdown-it</code> is very effective support of<br>\n<a href=\"https://www.npmjs.org/browse/keyword/markdown-it-plugin\">syntax plugins</a>.</p>\n<h3 id=\"Emojies\"><a class=\"header-anchor\" href=\"#Emojies\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-emoji\">Emojies</a></h3>\n<blockquote>\n<p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p>\n<p>Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n</blockquote>\n<p>see <a href=\"https://github.com/markdown-it/markdown-it-emoji#change-output\">how to change output</a> with twemoji.</p>\n<h3 id=\"Subscipt-Superscirpt\"><a class=\"header-anchor\" href=\"#Subscipt-Superscirpt\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-sub\">Subscipt</a> / <a href=\"https://github.com/markdown-it/markdown-it-sup\">Superscirpt</a></h3>\n<ul>\n<li>19^th^</li>\n<li>H~2~O</li>\n</ul>\n<h3 id=\"ins\"><a class=\"header-anchor\" href=\"#ins\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-ins\">&lt;ins&gt;</a></h3>\n<p>++Inserted text++</p>\n<h3 id=\"mark\"><a class=\"header-anchor\" href=\"#mark\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-mark\">&lt;mark&gt;</a></h3>\n<p>==Marked text==</p>\n<h3 id=\"Footnotes\"><a class=\"header-anchor\" href=\"#Footnotes\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-footnote\">Footnotes</a></h3>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote <strong>can have markup</strong></p>\n<pre><code>and multiple paragraphs.\n</code></pre>\n<p>[^second]: Footnote text.</p>\n<h3 id=\"Definition-lists\"><a class=\"header-anchor\" href=\"#Definition-lists\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-deflist\">Definition lists</a></h3>\n<p>Term 1</p>\n<p>:   Definition 1<br>\nwith lazy continuation.</p>\n<p>Term 2 with <em>inline markup</em></p>\n<p>:   Definition 2</p>\n<pre><code>    { some code, part of Definition 2 }\n\nThird paragraph of definition 2.\n</code></pre>\n<p><em>Compact style:</em></p>\n<p>Term 1<br>\n~ Definition 1</p>\n<p>Term 2<br>\n~ Definition 2a<br>\n~ Definition 2b</p>\n<h3 id=\"Abbreviations\"><a class=\"header-anchor\" href=\"#Abbreviations\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-abbr\">Abbreviations</a></h3>\n<p>This is HTML abbreviation example.</p>\n<p>It converts “HTML”, but keep intact partial entries like “xxxHTMLyyy” and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<h3 id=\"Custom-containers\"><a class=\"header-anchor\" href=\"#Custom-containers\">¶</a><a href=\"https://github.com/markdown-it/markdown-it-container\">Custom containers</a></h3>\n<p>::: warning<br>\n<em>here be dragons</em><br>\n:::</p>\n<h3 id=\"Attributes-data-attr-true\"><a class=\"header-anchor\" href=\"#Attributes-data-attr-true\">¶</a><a href=\"https://github.com/arve0/markdown-it-attrs\">Attributes</a> { data-attr=true }</h3>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/fixtures/outputs/commonmark-deprecated.html",
    "content": "<h1>h1 Heading em português</h1>\n<h2>h2 Heading :P</h2>\n<h3>h3 Heading</h3>\n<h4>h4 Heading</h4>\n<h5>h5 Heading</h5>\n<h6>h6 Heading</h6>\n<h2>Horizontal Rule</h2>\n<hr />\n<h2>Horizontal Rule</h2>\n<hr />\n<h2>Horizontal Rule</h2>\n<hr />\n<h2>Typographic replacements</h2>\n<p>Enable typographer option to see result.</p>\n<p>(c) (C) (r) (R) (tm) (TM) +-</p>\n<p>test.. test... test..... test?..... test!....</p>\n<p>!!!!!! ???? ,,  -- ---</p>\n<p>&quot;Smartypants, double quotes&quot; and 'single quotes'</p>\n<h2>Emphasis</h2>\n<p><strong>This is bold text</strong></p>\n<p><strong>This is bold text</strong></p>\n<p><em>This is italic text</em></p>\n<p><em>This is italic text</em></p>\n<p>~~Strikethrough~~</p>\n<h2>Blockquotes</h2>\n<blockquote>\n<p>Blockquotes can also be nested...</p>\n<blockquote>\n<p>...by using additional greater-than signs right next to each other...</p>\n<blockquote>\n<p>...or with spaces between arrows.</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<h2>Lists</h2>\n<p>Unordered</p>\n<ul>\n<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>\n<li>Sub-lists are made by indenting 2 spaces:\n<ul>\n<li>Marker character change forces new list start:\n<ul>\n<li>Ac tristique libero volutpat at</li>\n</ul>\n<ul>\n<li>Facilisis in pretium nisl aliquet</li>\n</ul>\n<ul>\n<li>Nulla volutpat aliquam velit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Very easy!</li>\n</ul>\n<p>Ordered</p>\n<ol>\n<li>Lorem ipsum dolor sit amet</li>\n<li>Consectetur adipiscing elit</li>\n<li>Integer molestie lorem at massa</li>\n</ol>\n<h2>Code</h2>\n<p>Inline <code>code</code></p>\n<p>Indented code</p>\n<pre><code>// Some comments\nline 1 of code\nline 2 of code\nline 3 of code\n</code></pre>\n<p>Block code &quot;fences&quot;</p>\n<pre><code>Sample text here...\n</code></pre>\n<p>Syntax highlighting</p>\n<pre><code class=\"language-js\">var foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n</code></pre>\n<h2>Tables</h2>\n<p>| Option | Description |\n| ------ | ----------- |\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |</p>\n<p>Right aligned columns</p>\n<p>| Option | Description |\n| ------:| -----------:|\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |</p>\n<h2>Links</h2>\n<p><a href=\"http://dev.nodeca.com\">link text</a></p>\n<p>Autoconverted link https://github.com/nodeca/pica (enable linkify to see)</p>\n<h2>Images</h2>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\" />\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\" /></p>\n<p><img src=\"https://octodex.github.com/images/dojocat.jpg\" alt=\"Alt text\" title=\"The Dojocat\" /></p>\n<h2>Plugins</h2>\n<p>The killer feature of <code>markdown-it</code> is very effective support of\n<a href=\"https://www.npmjs.org/browse/keyword/markdown-it-plugin\">syntax plugins</a>.</p>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-emoji\">Emojies</a></h3>\n<blockquote>\n<p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p>\n<p>Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n</blockquote>\n<p>see <a href=\"https://github.com/markdown-it/markdown-it-emoji#change-output\">how to change output</a> with twemoji.</p>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-sub\">Subscipt</a> / <a href=\"https://github.com/markdown-it/markdown-it-sup\">Superscirpt</a></h3>\n<ul>\n<li>19^th^</li>\n<li>H~2~O</li>\n</ul>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-ins\">&lt;ins&gt;</a></h3>\n<p>++Inserted text++</p>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-mark\">&lt;mark&gt;</a></h3>\n<p>==Marked text==</p>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-footnote\">Footnotes</a></h3>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote <strong>can have markup</strong></p>\n<pre><code>and multiple paragraphs.\n</code></pre>\n<p>[^second]: Footnote text.</p>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-deflist\">Definition lists</a></h3>\n<p>Term 1</p>\n<p>:   Definition 1\nwith lazy continuation.</p>\n<p>Term 2 with <em>inline markup</em></p>\n<p>:   Definition 2</p>\n<pre><code>    { some code, part of Definition 2 }\n\nThird paragraph of definition 2.\n</code></pre>\n<p><em>Compact style:</em></p>\n<p>Term 1\n~ Definition 1</p>\n<p>Term 2\n~ Definition 2a\n~ Definition 2b</p>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-abbr\">Abbreviations</a></h3>\n<p>This is HTML abbreviation example.</p>\n<p>It converts &quot;HTML&quot;, but keep intact partial entries like &quot;xxxHTMLyyy&quot; and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<h3><a href=\"https://github.com/markdown-it/markdown-it-container\">Custom containers</a></h3>\n<p>::: warning\n<em>here be dragons</em>\n:::</p>\n<h3><a href=\"https://github.com/arve0/markdown-it-attrs\">Attributes</a> { data-attr=true }</h3>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/fixtures/outputs/commonmark.html",
    "content": "<h1>h1 Heading em português</h1>\n<h2 id=\"h2-Heading-P\">h2 Heading :P</h2>\n<h3 id=\"h3-Heading\">h3 Heading</h3>\n<h4 id=\"h4-Heading\">h4 Heading</h4>\n<h5 id=\"h5-Heading\">h5 Heading</h5>\n<h6 id=\"h6-Heading\">h6 Heading</h6>\n<h2 id=\"Horizontal-Rule\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-2\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-3\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Typographic-replacements\">Typographic replacements</h2>\n<p>Enable typographer option to see result.</p>\n<p>(c) (C) (r) (R) (tm) (TM) +-</p>\n<p>test.. test... test..... test?..... test!....</p>\n<p>!!!!!! ???? ,,  -- ---</p>\n<p>&quot;Smartypants, double quotes&quot; and 'single quotes'</p>\n<h2 id=\"Emphasis\">Emphasis</h2>\n<p><strong>This is bold text</strong></p>\n<p><strong>This is bold text</strong></p>\n<p><em>This is italic text</em></p>\n<p><em>This is italic text</em></p>\n<p>~~Strikethrough~~</p>\n<h2 id=\"Blockquotes\">Blockquotes</h2>\n<blockquote>\n<p>Blockquotes can also be nested...</p>\n<blockquote>\n<p>...by using additional greater-than signs right next to each other...</p>\n<blockquote>\n<p>...or with spaces between arrows.</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<h2 id=\"Lists\">Lists</h2>\n<p>Unordered</p>\n<ul>\n<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>\n<li>Sub-lists are made by indenting 2 spaces:\n<ul>\n<li>Marker character change forces new list start:\n<ul>\n<li>Ac tristique libero volutpat at</li>\n</ul>\n<ul>\n<li>Facilisis in pretium nisl aliquet</li>\n</ul>\n<ul>\n<li>Nulla volutpat aliquam velit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Very easy!</li>\n</ul>\n<p>Ordered</p>\n<ol>\n<li>Lorem ipsum dolor sit amet</li>\n<li>Consectetur adipiscing elit</li>\n<li>Integer molestie lorem at massa</li>\n</ol>\n<h2 id=\"Code\">Code</h2>\n<p>Inline <code>code</code></p>\n<p>Indented code</p>\n<pre><code>// Some comments\nline 1 of code\nline 2 of code\nline 3 of code\n</code></pre>\n<p>Block code &quot;fences&quot;</p>\n<pre><code>Sample text here...\n</code></pre>\n<p>Syntax highlighting</p>\n<pre><code class=\"language-js\">var foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n</code></pre>\n<h2 id=\"Tables\">Tables</h2>\n<p>| Option | Description |<br>\n| ------ | ----------- |<br>\n| data   | path to data files to supply the data that will be passed into templates. |<br>\n| engine | engine to be used for processing templates. Handlebars is the default. |<br>\n| ext    | extension to be used for dest files. |</p>\n<p>Right aligned columns</p>\n<p>| Option | Description |<br>\n| ------:| -----------:|<br>\n| data   | path to data files to supply the data that will be passed into templates. |<br>\n| engine | engine to be used for processing templates. Handlebars is the default. |<br>\n| ext    | extension to be used for dest files. |</p>\n<h2 id=\"Links\">Links</h2>\n<p><a href=\"http://dev.nodeca.com\">link text</a></p>\n<p>Autoconverted link https://github.com/nodeca/pica (enable linkify to see)</p>\n<h2 id=\"Images\">Images</h2>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\"><br>\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\"></p>\n<p><img src=\"https://octodex.github.com/images/dojocat.jpg\" alt=\"Alt text\" title=\"The Dojocat\"></p>\n<h2 id=\"Plugins\">Plugins</h2>\n<p>The killer feature of <code>markdown-it</code> is very effective support of<br>\n<a href=\"https://www.npmjs.org/browse/keyword/markdown-it-plugin\">syntax plugins</a>.</p>\n<h3 id=\"Emojies\"><a href=\"https://github.com/markdown-it/markdown-it-emoji\">Emojies</a></h3>\n<blockquote>\n<p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p>\n<p>Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n</blockquote>\n<p>see <a href=\"https://github.com/markdown-it/markdown-it-emoji#change-output\">how to change output</a> with twemoji.</p>\n<h3 id=\"Subscipt-Superscirpt\"><a href=\"https://github.com/markdown-it/markdown-it-sub\">Subscipt</a> / <a href=\"https://github.com/markdown-it/markdown-it-sup\">Superscirpt</a></h3>\n<ul>\n<li>19^th^</li>\n<li>H~2~O</li>\n</ul>\n<h3 id=\"ins\"><a href=\"https://github.com/markdown-it/markdown-it-ins\">&lt;ins&gt;</a></h3>\n<p>++Inserted text++</p>\n<h3 id=\"mark\"><a href=\"https://github.com/markdown-it/markdown-it-mark\">&lt;mark&gt;</a></h3>\n<p>==Marked text==</p>\n<h3 id=\"Footnotes\"><a href=\"https://github.com/markdown-it/markdown-it-footnote\">Footnotes</a></h3>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote <strong>can have markup</strong></p>\n<pre><code>and multiple paragraphs.\n</code></pre>\n<p>[^second]: Footnote text.</p>\n<h3 id=\"Definition-lists\"><a href=\"https://github.com/markdown-it/markdown-it-deflist\">Definition lists</a></h3>\n<p>Term 1</p>\n<p>:   Definition 1<br>\nwith lazy continuation.</p>\n<p>Term 2 with <em>inline markup</em></p>\n<p>:   Definition 2</p>\n<pre><code>    { some code, part of Definition 2 }\n\nThird paragraph of definition 2.\n</code></pre>\n<p><em>Compact style:</em></p>\n<p>Term 1<br>\n~ Definition 1</p>\n<p>Term 2<br>\n~ Definition 2a<br>\n~ Definition 2b</p>\n<h3 id=\"Abbreviations\"><a href=\"https://github.com/markdown-it/markdown-it-abbr\">Abbreviations</a></h3>\n<p>This is HTML abbreviation example.</p>\n<p>It converts &quot;HTML&quot;, but keep intact partial entries like &quot;xxxHTMLyyy&quot; and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<h3 id=\"Custom-containers\"><a href=\"https://github.com/markdown-it/markdown-it-container\">Custom containers</a></h3>\n<p>::: warning<br>\n<em>here be dragons</em><br>\n:::</p>\n<h3 id=\"Attributes-data-attr-true\"><a href=\"https://github.com/arve0/markdown-it-attrs\">Attributes</a> { data-attr=true }</h3>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/fixtures/outputs/custom.html",
    "content": "<h1>h1 Heading em português</h1>\n<h2 id=\"h2-Heading-P\">h2 Heading :P</h2>\n<h3 id=\"h3-Heading\">h3 Heading</h3>\n<h4 id=\"h4-Heading\">h4 Heading</h4>\n<h5 id=\"h5-Heading\">h5 Heading</h5>\n<h6 id=\"h6-Heading\">h6 Heading</h6>\n<h2 id=\"Horizontal-Rule\">Horizontal Rule</h2>\n<hr />\n<h2 id=\"Horizontal-Rule-2\">Horizontal Rule</h2>\n<hr />\n<h2 id=\"Horizontal-Rule-3\">Horizontal Rule</h2>\n<hr />\n<h2 id=\"Typographic-replacements\">Typographic replacements</h2>\n<p>Enable typographer option to see result.</p>\n<p>© © ® ® ™ ™ ±</p>\n<p>test… test… test… test?.. test!..</p>\n<p>!!! ??? ,  – —</p>\n<p>«Smartypants, double quotes» and “single quotes”</p>\n<h2 id=\"Emphasis\">Emphasis</h2>\n<p><strong>This is bold text</strong></p>\n<p><strong>This is bold text</strong></p>\n<p><em>This is italic text</em></p>\n<p><em>This is italic text</em></p>\n<p><s>Strikethrough</s></p>\n<h2 id=\"Blockquotes\">Blockquotes</h2>\n<blockquote>\n<p>Blockquotes can also be nested…</p>\n<blockquote>\n<p>…by using additional greater-than signs right next to each other…</p>\n<blockquote>\n<p>…or with spaces between arrows.</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<h2 id=\"Lists\">Lists</h2>\n<p>Unordered</p>\n<ul>\n<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>\n<li>Sub-lists are made by indenting 2 spaces:\n<ul>\n<li>Marker character change forces new list start:\n<ul>\n<li>Ac tristique libero volutpat at</li>\n</ul>\n<ul>\n<li>Facilisis in pretium nisl aliquet</li>\n</ul>\n<ul>\n<li>Nulla volutpat aliquam velit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Very easy!</li>\n</ul>\n<p>Ordered</p>\n<ol>\n<li>Lorem ipsum dolor sit amet</li>\n<li>Consectetur adipiscing elit</li>\n<li>Integer molestie lorem at massa</li>\n</ol>\n<h2 id=\"Code\">Code</h2>\n<p>Inline <code>code</code></p>\n<p>Indented code</p>\n<pre><code>// Some comments\nline 1 of code\nline 2 of code\nline 3 of code\n</code></pre>\n<p>Block code «fences»</p>\n<pre><code>Sample text here...\n</code></pre>\n<p>Syntax highlighting</p>\n<pre><code class=\"js\">var foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n</code></pre>\n<h2 id=\"Tables\">Tables</h2>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>data</td>\n<td>path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td>engine</td>\n<td>engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td>ext</td>\n<td>extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<p>Right aligned columns</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:right\">Option</th>\n<th style=\"text-align:right\">Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:right\">data</td>\n<td style=\"text-align:right\">path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">engine</td>\n<td style=\"text-align:right\">engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">ext</td>\n<td style=\"text-align:right\">extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"Links\">Links</h2>\n<p><a href=\"http://dev.nodeca.com\">link text</a></p>\n<p>Autoconverted link <a href=\"https://github.com/nodeca/pica\">https://github.com/nodeca/pica</a> (enable linkify to see)</p>\n<h2 id=\"Images\">Images</h2>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\" /><br />\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\" /></p>\n<p><img src=\"https://octodex.github.com/images/dojocat.jpg\" alt=\"Alt text\" title=\"The Dojocat\" /></p>\n<h2 id=\"Plugins\">Plugins</h2>\n<p>The killer feature of <code>markdown-it</code> is very effective support of<br />\n<a href=\"https://www.npmjs.org/browse/keyword/markdown-it-plugin\">syntax plugins</a>.</p>\n<h3 id=\"Emojies\"><a href=\"https://github.com/markdown-it/markdown-it-emoji\">Emojies</a></h3>\n<blockquote>\n<p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p>\n<p>Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n</blockquote>\n<p>see <a href=\"https://github.com/markdown-it/markdown-it-emoji#change-output\">how to change output</a> with twemoji.</p>\n<h3 id=\"Subscipt-Superscirpt\"><a href=\"https://github.com/markdown-it/markdown-it-sub\">Subscipt</a> / <a href=\"https://github.com/markdown-it/markdown-it-sup\">Superscirpt</a></h3>\n<ul>\n<li>19^th^</li>\n<li>H~2~O</li>\n</ul>\n<h3 id=\"ins\"><a href=\"https://github.com/markdown-it/markdown-it-ins\">&lt;ins&gt;</a></h3>\n<p>++Inserted text++</p>\n<h3 id=\"mark\"><a href=\"https://github.com/markdown-it/markdown-it-mark\">&lt;mark&gt;</a></h3>\n<p>==Marked text==</p>\n<h3 id=\"Footnotes\"><a href=\"https://github.com/markdown-it/markdown-it-footnote\">Footnotes</a></h3>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote <strong>can have markup</strong></p>\n<pre><code>and multiple paragraphs.\n</code></pre>\n<p>[^second]: Footnote text.</p>\n<h3 id=\"Definition-lists\"><a href=\"https://github.com/markdown-it/markdown-it-deflist\">Definition lists</a></h3>\n<p>Term 1</p>\n<p>:   Definition 1<br />\nwith lazy continuation.</p>\n<p>Term 2 with <em>inline markup</em></p>\n<p>:   Definition 2</p>\n<pre><code>    { some code, part of Definition 2 }\n\nThird paragraph of definition 2.\n</code></pre>\n<p><em>Compact style:</em></p>\n<p>Term 1<br />\n~ Definition 1</p>\n<p>Term 2<br />\n~ Definition 2a<br />\n~ Definition 2b</p>\n<h3 id=\"Abbreviations\"><a href=\"https://github.com/markdown-it/markdown-it-abbr\">Abbreviations</a></h3>\n<p>This is HTML abbreviation example.</p>\n<p>It converts «HTML», but keep intact partial entries like «xxxHTMLyyy» and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<h3 id=\"Custom-containers\"><a href=\"https://github.com/markdown-it/markdown-it-container\">Custom containers</a></h3>\n<p>::: warning<br />\n<em>here be dragons</em><br />\n:::</p>\n<h3 id=\"Attributes-data-attr-true\"><a href=\"https://github.com/arve0/markdown-it-attrs\">Attributes</a> { data-attr=true }</h3>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/fixtures/outputs/default-disable_rules.html",
    "content": "<h1>h1 Heading em português</h1>\n<h2 id=\"h2-Heading-P\">h2 Heading :P</h2>\n<h3 id=\"h3-Heading\">h3 Heading</h3>\n<h4 id=\"h4-Heading\">h4 Heading</h4>\n<h5 id=\"h5-Heading\">h5 Heading</h5>\n<h6 id=\"h6-Heading\">h6 Heading</h6>\n<h2 id=\"Horizontal-Rule\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-2\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-3\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Typographic-replacements\">Typographic replacements</h2>\n<p>Enable typographer option to see result.</p>\n<p>© © ® ® ™ ™ ±</p>\n<p>test… test… test… test?.. test!..</p>\n<p>!!! ??? ,  – —</p>\n<p>“Smartypants, double quotes” and ‘single quotes’</p>\n<h2 id=\"Emphasis\">Emphasis</h2>\n<p><strong>This is bold text</strong></p>\n<p><strong>This is bold text</strong></p>\n<p><em>This is italic text</em></p>\n<p><em>This is italic text</em></p>\n<p><s>Strikethrough</s></p>\n<h2 id=\"Blockquotes\">Blockquotes</h2>\n<blockquote>\n<p>Blockquotes can also be nested…</p>\n<blockquote>\n<p>…by using additional greater-than signs right next to each other…</p>\n<blockquote>\n<p>…or with spaces between arrows.</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<h2 id=\"Lists\">Lists</h2>\n<p>Unordered</p>\n<ul>\n<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>\n<li>Sub-lists are made by indenting 2 spaces:\n<ul>\n<li>Marker character change forces new list start:\n<ul>\n<li>Ac tristique libero volutpat at</li>\n</ul>\n<ul>\n<li>Facilisis in pretium nisl aliquet</li>\n</ul>\n<ul>\n<li>Nulla volutpat aliquam velit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Very easy!</li>\n</ul>\n<p>Ordered</p>\n<ol>\n<li>Lorem ipsum dolor sit amet</li>\n<li>Consectetur adipiscing elit</li>\n<li>Integer molestie lorem at massa</li>\n</ol>\n<h2 id=\"Code\">Code</h2>\n<p>Inline <code>code</code></p>\n<p>Indented code</p>\n<pre><code>// Some comments\nline 1 of code\nline 2 of code\nline 3 of code\n</code></pre>\n<p>Block code “fences”</p>\n<pre><code>Sample text here...\n</code></pre>\n<p>Syntax highlighting</p>\n<pre><code class=\"language-js\">var foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n</code></pre>\n<h2 id=\"Tables\">Tables</h2>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>data</td>\n<td>path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td>engine</td>\n<td>engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td>ext</td>\n<td>extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<p>Right aligned columns</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:right\">Option</th>\n<th style=\"text-align:right\">Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:right\">data</td>\n<td style=\"text-align:right\">path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">engine</td>\n<td style=\"text-align:right\">engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">ext</td>\n<td style=\"text-align:right\">extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"Links\">Links</h2>\n<p>[link text](http://dev.nodeca.com)</p>\n<p>Autoconverted link https://github.com/nodeca/pica (enable linkify to see)</p>\n<h2 id=\"Images\">Images</h2>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\"><br>\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\"></p>\n<p><img src=\"https://octodex.github.com/images/dojocat.jpg\" alt=\"Alt text\" title=\"The Dojocat\"></p>\n<h2 id=\"Plugins\">Plugins</h2>\n<p>The killer feature of <code>markdown-it</code> is very effective support of<br>\n[syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin).</p>\n<h3 id=\"Emojies-https-github-com-markdown-it-markdown-it-emoji\">[Emojies](https://github.com/markdown-it/markdown-it-emoji)</h3>\n<blockquote>\n<p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p>\n<p>Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n</blockquote>\n<p>see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji.</p>\n<h3 id=\"Subscipt-https-github-com-markdown-it-markdown-it-sub-Superscirpt-https-github-com-markdown-it-markdown-it-sup\">[Subscipt](https://github.com/markdown-it/markdown-it-sub) / [Superscirpt](https://github.com/markdown-it/markdown-it-sup)</h3>\n<ul>\n<li>19^th^</li>\n<li>H~2~O</li>\n</ul>\n<h3 id=\"ins-https-github-com-markdown-it-markdown-it-ins\">[&lt;ins&gt;](https://github.com/markdown-it/markdown-it-ins)</h3>\n<p>++Inserted text++</p>\n<h3 id=\"mark-https-github-com-markdown-it-markdown-it-mark\">[&lt;mark&gt;](https://github.com/markdown-it/markdown-it-mark)</h3>\n<p>==Marked text==</p>\n<h3 id=\"Footnotes-https-github-com-markdown-it-markdown-it-footnote\">[Footnotes](https://github.com/markdown-it/markdown-it-footnote)</h3>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote <strong>can have markup</strong></p>\n<pre><code>and multiple paragraphs.\n</code></pre>\n<p>[^second]: Footnote text.</p>\n<h3 id=\"Definition-lists-https-github-com-markdown-it-markdown-it-deflist\">[Definition lists](https://github.com/markdown-it/markdown-it-deflist)</h3>\n<p>Term 1</p>\n<p>:   Definition 1<br>\nwith lazy continuation.</p>\n<p>Term 2 with <em>inline markup</em></p>\n<p>:   Definition 2</p>\n<pre><code>    { some code, part of Definition 2 }\n\nThird paragraph of definition 2.\n</code></pre>\n<p><em>Compact style:</em></p>\n<p>Term 1<br>\n~ Definition 1</p>\n<p>Term 2<br>\n~ Definition 2a<br>\n~ Definition 2b</p>\n<h3 id=\"Abbreviations-https-github-com-markdown-it-markdown-it-abbr\">[Abbreviations](https://github.com/markdown-it/markdown-it-abbr)</h3>\n<p>This is HTML abbreviation example.</p>\n<p>It converts “HTML”, but keep intact partial entries like “xxxHTMLyyy” and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<h3 id=\"Custom-containers-https-github-com-markdown-it-markdown-it-container\">[Custom containers](https://github.com/markdown-it/markdown-it-container)</h3>\n<p>::: warning<br>\n<em>here be dragons</em><br>\n:::</p>\n<h3 id=\"Attributes-https-github-com-arve0-markdown-it-attrs-data-attr-true\">[Attributes](https://github.com/arve0/markdown-it-attrs) { data-attr=true }</h3>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/fixtures/outputs/default.html",
    "content": "<h1>h1 Heading em português</h1>\n<h2 id=\"h2-Heading-P\">h2 Heading :P</h2>\n<h3 id=\"h3-Heading\">h3 Heading</h3>\n<h4 id=\"h4-Heading\">h4 Heading</h4>\n<h5 id=\"h5-Heading\">h5 Heading</h5>\n<h6 id=\"h6-Heading\">h6 Heading</h6>\n<h2 id=\"Horizontal-Rule\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-2\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-3\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Typographic-replacements\">Typographic replacements</h2>\n<p>Enable typographer option to see result.</p>\n<p>© © ® ® ™ ™ ±</p>\n<p>test… test… test… test?.. test!..</p>\n<p>!!! ??? ,  – —</p>\n<p>“Smartypants, double quotes” and ‘single quotes’</p>\n<h2 id=\"Emphasis\">Emphasis</h2>\n<p><strong>This is bold text</strong></p>\n<p><strong>This is bold text</strong></p>\n<p><em>This is italic text</em></p>\n<p><em>This is italic text</em></p>\n<p><s>Strikethrough</s></p>\n<h2 id=\"Blockquotes\">Blockquotes</h2>\n<blockquote>\n<p>Blockquotes can also be nested…</p>\n<blockquote>\n<p>…by using additional greater-than signs right next to each other…</p>\n<blockquote>\n<p>…or with spaces between arrows.</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<h2 id=\"Lists\">Lists</h2>\n<p>Unordered</p>\n<ul>\n<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>\n<li>Sub-lists are made by indenting 2 spaces:\n<ul>\n<li>Marker character change forces new list start:\n<ul>\n<li>Ac tristique libero volutpat at</li>\n</ul>\n<ul>\n<li>Facilisis in pretium nisl aliquet</li>\n</ul>\n<ul>\n<li>Nulla volutpat aliquam velit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Very easy!</li>\n</ul>\n<p>Ordered</p>\n<ol>\n<li>Lorem ipsum dolor sit amet</li>\n<li>Consectetur adipiscing elit</li>\n<li>Integer molestie lorem at massa</li>\n</ol>\n<h2 id=\"Code\">Code</h2>\n<p>Inline <code>code</code></p>\n<p>Indented code</p>\n<pre><code>// Some comments\nline 1 of code\nline 2 of code\nline 3 of code\n</code></pre>\n<p>Block code “fences”</p>\n<pre><code>Sample text here...\n</code></pre>\n<p>Syntax highlighting</p>\n<pre><code class=\"language-js\">var foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n</code></pre>\n<h2 id=\"Tables\">Tables</h2>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>data</td>\n<td>path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td>engine</td>\n<td>engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td>ext</td>\n<td>extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<p>Right aligned columns</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:right\">Option</th>\n<th style=\"text-align:right\">Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:right\">data</td>\n<td style=\"text-align:right\">path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">engine</td>\n<td style=\"text-align:right\">engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">ext</td>\n<td style=\"text-align:right\">extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"Links\">Links</h2>\n<p><a href=\"http://dev.nodeca.com\">link text</a></p>\n<p>Autoconverted link <a href=\"https://github.com/nodeca/pica\">https://github.com/nodeca/pica</a> (enable linkify to see)</p>\n<h2 id=\"Images\">Images</h2>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\"><br>\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\"></p>\n<p><img src=\"https://octodex.github.com/images/dojocat.jpg\" alt=\"Alt text\" title=\"The Dojocat\"></p>\n<h2 id=\"Plugins\">Plugins</h2>\n<p>The killer feature of <code>markdown-it</code> is very effective support of<br>\n<a href=\"https://www.npmjs.org/browse/keyword/markdown-it-plugin\">syntax plugins</a>.</p>\n<h3 id=\"Emojies\"><a href=\"https://github.com/markdown-it/markdown-it-emoji\">Emojies</a></h3>\n<blockquote>\n<p>Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:</p>\n<p>Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n</blockquote>\n<p>see <a href=\"https://github.com/markdown-it/markdown-it-emoji#change-output\">how to change output</a> with twemoji.</p>\n<h3 id=\"Subscipt-Superscirpt\"><a href=\"https://github.com/markdown-it/markdown-it-sub\">Subscipt</a> / <a href=\"https://github.com/markdown-it/markdown-it-sup\">Superscirpt</a></h3>\n<ul>\n<li>19^th^</li>\n<li>H~2~O</li>\n</ul>\n<h3 id=\"ins\"><a href=\"https://github.com/markdown-it/markdown-it-ins\">&lt;ins&gt;</a></h3>\n<p>++Inserted text++</p>\n<h3 id=\"mark\"><a href=\"https://github.com/markdown-it/markdown-it-mark\">&lt;mark&gt;</a></h3>\n<p>==Marked text==</p>\n<h3 id=\"Footnotes\"><a href=\"https://github.com/markdown-it/markdown-it-footnote\">Footnotes</a></h3>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote <strong>can have markup</strong></p>\n<pre><code>and multiple paragraphs.\n</code></pre>\n<p>[^second]: Footnote text.</p>\n<h3 id=\"Definition-lists\"><a href=\"https://github.com/markdown-it/markdown-it-deflist\">Definition lists</a></h3>\n<p>Term 1</p>\n<p>:   Definition 1<br>\nwith lazy continuation.</p>\n<p>Term 2 with <em>inline markup</em></p>\n<p>:   Definition 2</p>\n<pre><code>    { some code, part of Definition 2 }\n\nThird paragraph of definition 2.\n</code></pre>\n<p><em>Compact style:</em></p>\n<p>Term 1<br>\n~ Definition 1</p>\n<p>Term 2<br>\n~ Definition 2a<br>\n~ Definition 2b</p>\n<h3 id=\"Abbreviations\"><a href=\"https://github.com/markdown-it/markdown-it-abbr\">Abbreviations</a></h3>\n<p>This is HTML abbreviation example.</p>\n<p>It converts “HTML”, but keep intact partial entries like “xxxHTMLyyy” and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<h3 id=\"Custom-containers\"><a href=\"https://github.com/markdown-it/markdown-it-container\">Custom containers</a></h3>\n<p>::: warning<br>\n<em>here be dragons</em><br>\n:::</p>\n<h3 id=\"Attributes-data-attr-true\"><a href=\"https://github.com/arve0/markdown-it-attrs\">Attributes</a> { data-attr=true }</h3>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/fixtures/outputs/plugins.html",
    "content": "<h1>h1 Heading em português</h1>\n<h2 id=\"h2-Heading-😛\">h2 Heading 😛</h2>\n<h3 id=\"h3-Heading\">h3 Heading</h3>\n<h4 id=\"h4-Heading\">h4 Heading</h4>\n<h5 id=\"h5-Heading\">h5 Heading</h5>\n<h6 id=\"h6-Heading\">h6 Heading</h6>\n<h2 id=\"Horizontal-Rule\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-2\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Horizontal-Rule-3\">Horizontal Rule</h2>\n<hr>\n<h2 id=\"Typographic-replacements\">Typographic replacements</h2>\n<p>Enable typographer option to see result.</p>\n<p>© © ® ® ™ ™ ±</p>\n<p>test… test… test… test?.. test!..</p>\n<p>!!! ??? ,  – —</p>\n<p>“Smartypants, double quotes” and ‘single quotes’</p>\n<h2 id=\"Emphasis\">Emphasis</h2>\n<p><strong>This is bold text</strong></p>\n<p><strong>This is bold text</strong></p>\n<p><em>This is italic text</em></p>\n<p><em>This is italic text</em></p>\n<p><s>Strikethrough</s></p>\n<h2 id=\"Blockquotes\">Blockquotes</h2>\n<blockquote>\n<p>Blockquotes can also be nested…</p>\n<blockquote>\n<p>…by using additional greater-than signs right next to each other…</p>\n<blockquote>\n<p>…or with spaces between arrows.</p>\n</blockquote>\n</blockquote>\n</blockquote>\n<h2 id=\"Lists\">Lists</h2>\n<p>Unordered</p>\n<ul>\n<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>\n<li>Sub-lists are made by indenting 2 spaces:\n<ul>\n<li>Marker character change forces new list start:\n<ul>\n<li>Ac tristique libero volutpat at</li>\n</ul>\n<ul>\n<li>Facilisis in pretium nisl aliquet</li>\n</ul>\n<ul>\n<li>Nulla volutpat aliquam velit</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Very easy!</li>\n</ul>\n<p>Ordered</p>\n<ol>\n<li>Lorem ipsum dolor sit amet</li>\n<li>Consectetur adipiscing elit</li>\n<li>Integer molestie lorem at massa</li>\n</ol>\n<h2 id=\"Code\">Code</h2>\n<p>Inline <code>code</code></p>\n<p>Indented code</p>\n<pre><code>// Some comments\nline 1 of code\nline 2 of code\nline 3 of code\n</code></pre>\n<p>Block code “fences”</p>\n<pre><code>Sample text here...\n</code></pre>\n<p>Syntax highlighting</p>\n<pre><code class=\"language-js\">var foo = function (bar) {\n  return bar++;\n};\n\nconsole.log(foo(5));\n</code></pre>\n<h2 id=\"Tables\">Tables</h2>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>data</td>\n<td>path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td>engine</td>\n<td>engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td>ext</td>\n<td>extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<p>Right aligned columns</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:right\">Option</th>\n<th style=\"text-align:right\">Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:right\">data</td>\n<td style=\"text-align:right\">path to data files to supply the data that will be passed into templates.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">engine</td>\n<td style=\"text-align:right\">engine to be used for processing templates. Handlebars is the default.</td>\n</tr>\n<tr>\n<td style=\"text-align:right\">ext</td>\n<td style=\"text-align:right\">extension to be used for dest files.</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"Links\">Links</h2>\n<p><a href=\"http://dev.nodeca.com\">link text</a></p>\n<p>Autoconverted link <a href=\"https://github.com/nodeca/pica\">https://github.com/nodeca/pica</a> (enable linkify to see)</p>\n<h2 id=\"Images\">Images</h2>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\"><br>\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\"></p>\n<p><img src=\"https://octodex.github.com/images/dojocat.jpg\" alt=\"Alt text\" title=\"The Dojocat\"></p>\n<h2 id=\"Plugins\">Plugins</h2>\n<p>The killer feature of <code>markdown-it</code> is very effective support of<br>\n<a href=\"https://www.npmjs.org/browse/keyword/markdown-it-plugin\">syntax plugins</a>.</p>\n<h3 id=\"Emojies\"><a href=\"https://github.com/markdown-it/markdown-it-emoji\">Emojies</a></h3>\n<blockquote>\n<p>Classic markup: 😉 :crush: 😢 :tear: 😆 😋</p>\n<p>Shortcuts (emoticons): 😃 😦 😎 😉</p>\n</blockquote>\n<p>see <a href=\"https://github.com/markdown-it/markdown-it-emoji#change-output\">how to change output</a> with twemoji.</p>\n<h3 id=\"Subscipt-Superscirpt\"><a href=\"https://github.com/markdown-it/markdown-it-sub\">Subscipt</a> / <a href=\"https://github.com/markdown-it/markdown-it-sup\">Superscirpt</a></h3>\n<ul>\n<li>19<sup>th</sup></li>\n<li>H<sub>2</sub>O</li>\n</ul>\n<h3 id=\"ins\"><a href=\"https://github.com/markdown-it/markdown-it-ins\">&lt;ins&gt;</a></h3>\n<p><ins>Inserted text</ins></p>\n<h3 id=\"mark\"><a href=\"https://github.com/markdown-it/markdown-it-mark\">&lt;mark&gt;</a></h3>\n<p><mark>Marked text</mark></p>\n<h3 id=\"Footnotes\"><a href=\"https://github.com/markdown-it/markdown-it-footnote\">Footnotes</a></h3>\n<p>Footnote 1 link<sup class=\"footnote-ref\"><a href=\"#fn1\" id=\"fnref1\">[1]</a></sup>.</p>\n<p>Footnote 2 link<sup class=\"footnote-ref\"><a href=\"#fn2\" id=\"fnref2\">[2]</a></sup>.</p>\n<p>Inline footnote<sup class=\"footnote-ref\"><a href=\"#fn3\" id=\"fnref3\">[3]</a></sup> definition.</p>\n<p>Duplicated footnote reference<sup class=\"footnote-ref\"><a href=\"#fn2\" id=\"fnref2:1\">[2:1]</a></sup>.</p>\n<h3 id=\"Definition-lists\"><a href=\"https://github.com/markdown-it/markdown-it-deflist\">Definition lists</a></h3>\n<dl>\n<dt>Term 1</dt>\n<dd>\n<p>Definition 1<br>\nwith lazy continuation.</p>\n</dd>\n<dt>Term 2 with <em>inline markup</em></dt>\n<dd>\n<p>Definition 2</p>\n<pre><code>  { some code, part of Definition 2 }\n</code></pre>\n<p>Third paragraph of definition 2.</p>\n</dd>\n</dl>\n<p><em>Compact style:</em></p>\n<dl>\n<dt>Term 1</dt>\n<dd>Definition 1</dd>\n<dt>Term 2</dt>\n<dd>Definition 2a</dd>\n<dd>Definition 2b</dd>\n</dl>\n<h3 id=\"Abbreviations\"><a href=\"https://github.com/markdown-it/markdown-it-abbr\">Abbreviations</a></h3>\n<p>This is <abbr title=\"Hyper Text Markup Language\">HTML</abbr> abbreviation example.</p>\n<p>It converts “<abbr title=\"Hyper Text Markup Language\">HTML</abbr>”, but keep intact partial entries like “xxxHTMLyyy” and so on.</p>\n<h3 id=\"Custom-containers\"><a href=\"https://github.com/markdown-it/markdown-it-container\">Custom containers</a></h3>\n<p>::: warning<br>\n<em>here be dragons</em><br>\n:::</p>\n<h3 data-attr=\"true\" id=\"Attributes\"><a href=\"https://github.com/arve0/markdown-it-attrs\">Attributes</a></h3>\n<p>This is an attribute example.</p>\n<hr class=\"footnotes-sep\">\n<section class=\"footnotes\">\n<ol class=\"footnotes-list\">\n<li id=\"fn1\" class=\"footnote-item\"><p>Footnote <strong>can have markup</strong></p>\n<p>and multiple paragraphs. <a href=\"#fnref1\" class=\"footnote-backref\">↩︎</a></p>\n</li>\n<li id=\"fn2\" class=\"footnote-item\"><p>Footnote text. <a href=\"#fnref2\" class=\"footnote-backref\">↩︎</a> <a href=\"#fnref2:1\" class=\"footnote-backref\">↩︎</a></p>\n</li>\n<li id=\"fn3\" class=\"footnote-item\"><p>Text of inline footnote <a href=\"#fnref3\" class=\"footnote-backref\">↩︎</a></p>\n</li>\n</ol>\n</section>\n"
  },
  {
    "path": "test/fixtures/outputs/zero-enable_rules.html",
    "content": "<p># h1 Heading em português\n## h2 Heading :P\n### h3 Heading\n#### h4 Heading\n##### h5 Heading\n###### h6 Heading</p>\n<p>## Horizontal Rule</p>\n<p>___</p>\n<p>## Horizontal Rule</p>\n<p>---</p>\n<p>## Horizontal Rule</p>\n<p>***</p>\n<p>## Typographic replacements</p>\n<p>Enable typographer option to see result.</p>\n<p>(c) (C) (r) (R) (tm) (TM) +-</p>\n<p>test.. test... test..... test?..... test!....</p>\n<p>!!!!!! ???? ,,  -- ---</p>\n<p>&quot;Smartypants, double quotes&quot; and 'single quotes'</p>\n<p>## Emphasis</p>\n<p>**This is bold text**</p>\n<p>__This is bold text__</p>\n<p>*This is italic text*</p>\n<p>_This is italic text_</p>\n<p>~~Strikethrough~~</p>\n<p>## Blockquotes</p>\n<p>&gt; Blockquotes can also be nested...\n&gt;&gt; ...by using additional greater-than signs right next to each other...\n&gt; &gt; &gt; ...or with spaces between arrows.</p>\n<p>## Lists</p>\n<p>Unordered</p>\n<p>+ Create a list by starting a line with `+`, `-`, or `*`\n+ Sub-lists are made by indenting 2 spaces:\n  - Marker character change forces new list start:\n    * Ac tristique libero volutpat at\n    + Facilisis in pretium nisl aliquet\n    - Nulla volutpat aliquam velit\n+ Very easy!</p>\n<p>Ordered</p>\n<p>1. Lorem ipsum dolor sit amet\n2. Consectetur adipiscing elit\n3. Integer molestie lorem at massa</p>\n<p>## Code</p>\n<p>Inline `code`</p>\n<p>Indented code</p>\n<p>// Some comments\n    line 1 of code\n    line 2 of code\n    line 3 of code</p>\n<p>Block code &quot;fences&quot;</p>\n<p>```\nSample text here...\n```</p>\n<p>Syntax highlighting</p>\n<p>``` js\nvar foo = function (bar) {\n  return bar++;\n};</p>\n<p>console.log(foo(5));\n```</p>\n<p>## Tables</p>\n<p>| Option | Description |\n| ------ | ----------- |\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |</p>\n<p>Right aligned columns</p>\n<p>| Option | Description |\n| ------:| -----------:|\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |</p>\n<p>## Links</p>\n<p><a href=\"http://dev.nodeca.com\">link text</a></p>\n<p>Autoconverted link https://github.com/nodeca/pica (enable linkify to see)</p>\n<p>## Images</p>\n<p><img src=\"https://octodex.github.com/images/minion.png\" alt=\"Minion\">\n<img src=\"https://octodex.github.com/images/stormtroopocat.jpg\" alt=\"Stormtroopocat\" title=\"The Stormtroopocat\"></p>\n<p>![Alt text][id]</p>\n<p>[id]: https://octodex.github.com/images/dojocat.jpg  &quot;The Dojocat&quot;</p>\n<p>## Plugins</p>\n<p>The killer feature of `markdown-it` is very effective support of\n<a href=\"https://www.npmjs.org/browse/keyword/markdown-it-plugin\">syntax plugins</a>.</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-emoji\">Emojies</a></p>\n<p>&gt; Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:\n&gt;\n&gt; Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n<p>see <a href=\"https://github.com/markdown-it/markdown-it-emoji#change-output\">how to change output</a> with twemoji.</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-sub\">Subscipt</a> / <a href=\"https://github.com/markdown-it/markdown-it-sup\">Superscirpt</a></p>\n<p>- 19^th^\n- H~2~O</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-ins\">\\&lt;ins&gt;</a></p>\n<p>++Inserted text++</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-mark\">\\&lt;mark&gt;</a></p>\n<p>==Marked text==</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-footnote\">Footnotes</a></p>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote **can have markup**</p>\n<p>and multiple paragraphs.</p>\n<p>[^second]: Footnote text.</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-deflist\">Definition lists</a></p>\n<p>Term 1</p>\n<p>:   Definition 1\nwith lazy continuation.</p>\n<p>Term 2 with *inline markup*</p>\n<p>:   Definition 2</p>\n<p>{ some code, part of Definition 2 }</p>\n<p>Third paragraph of definition 2.</p>\n<p>_Compact style:_</p>\n<p>Term 1\n  ~ Definition 1</p>\n<p>Term 2\n  ~ Definition 2a\n  ~ Definition 2b</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-abbr\">Abbreviations</a></p>\n<p>This is HTML abbreviation example.</p>\n<p>It converts &quot;HTML&quot;, but keep intact partial entries like &quot;xxxHTMLyyy&quot; and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<p>### <a href=\"https://github.com/markdown-it/markdown-it-container\">Custom containers</a></p>\n<p>::: warning\n*here be dragons*\n:::</p>\n<p>### <a href=\"https://github.com/arve0/markdown-it-attrs\">Attributes</a> { data-attr=true }</p>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/fixtures/outputs/zero.html",
    "content": "<p># h1 Heading em português\n## h2 Heading :P\n### h3 Heading\n#### h4 Heading\n##### h5 Heading\n###### h6 Heading</p>\n<p>## Horizontal Rule</p>\n<p>___</p>\n<p>## Horizontal Rule</p>\n<p>---</p>\n<p>## Horizontal Rule</p>\n<p>***</p>\n<p>## Typographic replacements</p>\n<p>Enable typographer option to see result.</p>\n<p>(c) (C) (r) (R) (tm) (TM) +-</p>\n<p>test.. test... test..... test?..... test!....</p>\n<p>!!!!!! ???? ,,  -- ---</p>\n<p>&quot;Smartypants, double quotes&quot; and 'single quotes'</p>\n<p>## Emphasis</p>\n<p>**This is bold text**</p>\n<p>__This is bold text__</p>\n<p>*This is italic text*</p>\n<p>_This is italic text_</p>\n<p>~~Strikethrough~~</p>\n<p>## Blockquotes</p>\n<p>&gt; Blockquotes can also be nested...\n&gt;&gt; ...by using additional greater-than signs right next to each other...\n&gt; &gt; &gt; ...or with spaces between arrows.</p>\n<p>## Lists</p>\n<p>Unordered</p>\n<p>+ Create a list by starting a line with `+`, `-`, or `*`\n+ Sub-lists are made by indenting 2 spaces:\n  - Marker character change forces new list start:\n    * Ac tristique libero volutpat at\n    + Facilisis in pretium nisl aliquet\n    - Nulla volutpat aliquam velit\n+ Very easy!</p>\n<p>Ordered</p>\n<p>1. Lorem ipsum dolor sit amet\n2. Consectetur adipiscing elit\n3. Integer molestie lorem at massa</p>\n<p>## Code</p>\n<p>Inline `code`</p>\n<p>Indented code</p>\n<p>// Some comments\n    line 1 of code\n    line 2 of code\n    line 3 of code</p>\n<p>Block code &quot;fences&quot;</p>\n<p>```\nSample text here...\n```</p>\n<p>Syntax highlighting</p>\n<p>``` js\nvar foo = function (bar) {\n  return bar++;\n};</p>\n<p>console.log(foo(5));\n```</p>\n<p>## Tables</p>\n<p>| Option | Description |\n| ------ | ----------- |\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |</p>\n<p>Right aligned columns</p>\n<p>| Option | Description |\n| ------:| -----------:|\n| data   | path to data files to supply the data that will be passed into templates. |\n| engine | engine to be used for processing templates. Handlebars is the default. |\n| ext    | extension to be used for dest files. |</p>\n<p>## Links</p>\n<p>[link text](http://dev.nodeca.com)</p>\n<p>Autoconverted link https://github.com/nodeca/pica (enable linkify to see)</p>\n<p>## Images</p>\n<p>![Minion](https://octodex.github.com/images/minion.png)\n![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg &quot;The Stormtroopocat&quot;)</p>\n<p>![Alt text][id]</p>\n<p>[id]: https://octodex.github.com/images/dojocat.jpg  &quot;The Dojocat&quot;</p>\n<p>## Plugins</p>\n<p>The killer feature of `markdown-it` is very effective support of\n[syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin).</p>\n<p>### [Emojies](https://github.com/markdown-it/markdown-it-emoji)</p>\n<p>&gt; Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:\n&gt;\n&gt; Shortcuts (emoticons): :-) :-( 8-) ;)</p>\n<p>see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji.</p>\n<p>### [Subscipt](https://github.com/markdown-it/markdown-it-sub) / [Superscirpt](https://github.com/markdown-it/markdown-it-sup)</p>\n<p>- 19^th^\n- H~2~O</p>\n<p>### [\\&lt;ins&gt;](https://github.com/markdown-it/markdown-it-ins)</p>\n<p>++Inserted text++</p>\n<p>### [\\&lt;mark&gt;](https://github.com/markdown-it/markdown-it-mark)</p>\n<p>==Marked text==</p>\n<p>### [Footnotes](https://github.com/markdown-it/markdown-it-footnote)</p>\n<p>Footnote 1 link[^first].</p>\n<p>Footnote 2 link[^second].</p>\n<p>Inline footnote^[Text of inline footnote] definition.</p>\n<p>Duplicated footnote reference[^second].</p>\n<p>[^first]: Footnote **can have markup**</p>\n<p>and multiple paragraphs.</p>\n<p>[^second]: Footnote text.</p>\n<p>### [Definition lists](https://github.com/markdown-it/markdown-it-deflist)</p>\n<p>Term 1</p>\n<p>:   Definition 1\nwith lazy continuation.</p>\n<p>Term 2 with *inline markup*</p>\n<p>:   Definition 2</p>\n<p>{ some code, part of Definition 2 }</p>\n<p>Third paragraph of definition 2.</p>\n<p>_Compact style:_</p>\n<p>Term 1\n  ~ Definition 1</p>\n<p>Term 2\n  ~ Definition 2a\n  ~ Definition 2b</p>\n<p>### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr)</p>\n<p>This is HTML abbreviation example.</p>\n<p>It converts &quot;HTML&quot;, but keep intact partial entries like &quot;xxxHTMLyyy&quot; and so on.</p>\n<p>*[HTML]: Hyper Text Markup Language</p>\n<p>### [Custom containers](https://github.com/markdown-it/markdown-it-container)</p>\n<p>::: warning\n*here be dragons*\n:::</p>\n<p>### [Attributes](https://github.com/arve0/markdown-it-attrs) { data-attr=true }</p>\n<p>This is an attribute example.</p>\n"
  },
  {
    "path": "test/index.js",
    "content": "'use strict';\n\nrequire('chai').should();\nconst { readFileSync } = require('fs');\nconst { join } = require('path').posix;\nconst { sep } = require('path');\nconst Renderer = require('../lib/renderer');\nconst source = readFileSync('./test/fixtures/markdownit.md', 'utf8');\nconst Hexo = require('hexo');\nconst { url_for } = require('hexo-util');\n\ndescribe('Hexo Renderer Markdown-it', () => {\n  const hexo = new Hexo(__dirname, { silent: true });\n  const defaultCfg = JSON.parse(JSON.stringify(Object.assign(hexo.config, {\n    markdown: {\n      preset: 'default',\n      render: {\n        html: true,\n        xhtmlOut: false,\n        breaks: true,\n        linkify: true,\n        typographer: true,\n        quotes: '“”‘’'\n      },\n      anchors: {\n        level: 2,\n        collisionSuffix: '',\n        permalink: false,\n        permalinkClass: 'header-anchor',\n        permalinkSide: 'left',\n        permalinkSymbol: '¶',\n        case: 0,\n        separator: ''\n      }\n    }\n  })));\n\n  beforeEach(() => {\n    hexo.config = JSON.parse(JSON.stringify(defaultCfg));\n  });\n\n  describe('preset', () => {\n    it('default', () => {\n      hexo.config.markdown.preset = 'default';\n\n      const parsed_gfm = readFileSync('./test/fixtures/outputs/default.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n\n      result.should.equal(parsed_gfm);\n    });\n\n    it('commonmark', () => {\n      hexo.config.markdown.preset = 'commonmark';\n\n      const parsed_commonmark = readFileSync('./test/fixtures/outputs/commonmark.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n\n      result.should.equal(parsed_commonmark);\n    });\n\n    // Deprecated\n    it('handle deprecated config', () => {\n      hexo.config.markdown = 'commonmark';\n\n      const parsed_commonmark = readFileSync('./test/fixtures/outputs/commonmark-deprecated.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n\n      result.should.equal(parsed_commonmark);\n    });\n\n    it('zero', () => {\n      hexo.config.markdown.preset = 'zero';\n\n      const parsed_zero = readFileSync('./test/fixtures/outputs/zero.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n      result.should.equal(parsed_zero);\n    });\n  });\n\n  describe('render options', () => {\n    it('custom options', () => {\n      hexo.config.markdown.render = {\n        html: false,\n        xhtmlOut: true,\n        breaks: true,\n        langPrefix: '',\n        linkify: true,\n        typographer: true,\n        quotes: '«»“”'\n      };\n\n      const parsed_custom = readFileSync('./test/fixtures/outputs/custom.html', 'utf8');\n      const source = readFileSync('./test/fixtures/markdownit.md', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n      result.should.equal(parsed_custom);\n    });\n\n    it('langPrefix', () => {\n      hexo.config.markdown.render = {\n        langPrefix: 'lang-'\n      };\n\n      const text = '```js\\nexample\\n```';\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(text);\n      result.should.eql('<pre><code class=\"lang-js\">example\\n</code></pre>\\n');\n    });\n\n    it('render inline', () => {\n      const text = 'inline text';\n      const renderer = new Renderer(hexo);\n      const resultBlock = renderer.render({ text });\n      const resultInline = renderer.render({ text }, { inline: true });\n      resultBlock.should.eql('<p>inline text</p>\\n');\n      resultInline.should.eql('inline text');\n    });\n  });\n\n  describe('plugins', () => {\n    it('default', () => {\n      hexo.config.markdown.plugins = [\n        'markdown-it-abbr',\n        'markdown-it-attrs',\n        'markdown-it-container',\n        'markdown-it-deflist',\n        'markdown-it-emoji',\n        'markdown-it-footnote',\n        'markdown-it-ins',\n        'markdown-it-mark',\n        'markdown-it-sub',\n        'markdown-it-sup'\n      ];\n\n      const parsed_plugins = readFileSync('./test/fixtures/outputs/plugins.html', 'utf8');\n      const source = readFileSync('./test/fixtures/markdownit.md', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n      result.should.equal(parsed_plugins);\n    });\n\n    it('custom options', () => {\n      hexo.config.markdown.plugins = [\n        {\n          name: 'markdown-it-emoji',\n          options: {\n            defs: {\n              smile: ':lorem:'\n            }\n          }\n        }\n      ];\n\n      const text = ':smile:';\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(text);\n      result.should.equal('<p>:lorem:</p>\\n');\n    });\n  });\n\n  describe('anchors', () => {\n    it('collisionSuffix & permalinkClass', () => {\n      hexo.config.markdown.anchors = {\n        level: 2,\n        collisionSuffix: 'ver',\n        permalink: true,\n        permalinkClass: 'header-anchor',\n        permalinkSymbol: '¶'\n      };\n      const expected = readFileSync('./test/fixtures/outputs/anchors.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n\n      result.should.eql(expected);\n    });\n\n    it('permalink disabled', () => {\n      hexo.config.markdown.anchors = {\n        level: 1,\n        collisionSuffix: '',\n        permalink: false,\n        permalinkClass: 'header-anchor',\n        permalinkSymbol: '¶'\n      };\n\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render('# This is an H1 title\\n# This is an H1 title');\n      const expected = '<h1 id=\"This-is-an-H1-title\">This is an H1 title</h1>\\n<h1 id=\"This-is-an-H1-title-2\">This is an H1 title</h1>\\n';\n\n      result.should.eql(expected);\n    });\n\n    it('slugize - case & separator', () => {\n      hexo.config.markdown.anchors = {\n        level: 2,\n        case: 1,\n        separator: '_'\n      };\n\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render('## foo BAR');\n\n      result.should.equal('<h2 id=\"foo_bar\">foo BAR</h2>\\n');\n    });\n\n    it('multiple posts anchor id', () => {\n      hexo.config.markdown.anchors = {\n        level: 2,\n        collisionSuffix: 'ver',\n        permalink: true,\n        permalinkClass: 'header-anchor',\n        permalinkSymbol: '¶'\n      };\n      const expected = readFileSync('./test/fixtures/outputs/anchors.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n      const result2 = renderer.parser.render(source);\n\n      result.should.eql(expected);\n      result2.should.eql(expected);\n    });\n\n    describe('permalinkSide', () => {\n      const text = '## foo';\n\n      it('left', () => {\n        hexo.config.markdown.anchors = {\n          level: 2,\n          permalink: true,\n          permalinkClass: 'anchor',\n          permalinkSide: 'left',\n          permalinkSymbol: '#'\n        };\n        const renderer = new Renderer(hexo);\n        const result = renderer.parser.render(text);\n\n        result.should.equal('<h2 id=\"foo\"><a class=\"anchor\" href=\"#foo\">#</a>foo</h2>\\n');\n      });\n\n      it('right', () => {\n        hexo.config.markdown.anchors = {\n          level: 2,\n          permalink: true,\n          permalinkClass: 'anchor',\n          permalinkSide: 'right',\n          permalinkSymbol: '#'\n        };\n        const renderer = new Renderer(hexo);\n        const result = renderer.parser.render(text);\n\n        result.should.equal('<h2 id=\"foo\">foo<a class=\"anchor\" href=\"#foo\">#</a></h2>\\n');\n      });\n    });\n  });\n\n  describe('rules', () => {\n    it('enable_rules', () => {\n      hexo.config.markdown.preset = 'zero';\n      hexo.config.markdown.enable_rules = ['link', 'image'];\n\n      const parsed_zero = readFileSync('./test/fixtures/outputs/zero-enable_rules.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n\n      result.should.equal(parsed_zero);\n    });\n\n    it('disable_rules', () => {\n      hexo.config.markdown.preset = 'default';\n      hexo.config.markdown.render.linkify = false;\n      hexo.config.markdown.disable_rules = 'link';\n\n      const parsed = readFileSync('./test/fixtures/outputs/default-disable_rules.html', 'utf8');\n      const renderer = new Renderer(hexo);\n      const result = renderer.parser.render(source);\n\n      result.should.equal(parsed);\n    });\n  });\n\n  describe('execFilter', () => {\n    it('default', () => {\n\n      const renderer = new Renderer(hexo);\n      const result = renderer.render({ text: '[foo](javascript:bar)' });\n\n      result.should.equal('<p>[foo](javascript:bar)</p>\\n');\n    });\n\n    it('enable unsafe link', () => {\n      const filter = md => {\n        md.validateLink = function() { return true; };\n      };\n      hexo.extend.filter.register('markdown-it:renderer', filter);\n\n      const renderer = new Renderer(hexo);\n      const result = renderer.render({ text: '[foo](javascript:bar)' });\n\n      hexo.extend.filter.unregister('markdown-it:renderer', filter);\n\n      result.should.equal('<p><a href=\"javascript:bar\">foo</a></p>\\n');\n    });\n\n    it('should execute loaded scripts', async () => {\n      const renderer = new Renderer(hexo);\n\n      hexo.env.init = true;\n      await hexo.init();\n\n      const result = renderer.render({ text: '[foo](javascript:bar)' });\n\n      result.should.equal('<p><a href=\"javascript:bar\">foo</a></p>\\n');\n    });\n\n    it('should be called in render', () => {\n      const iterates = 3;\n      const spy = {\n        called: 0,\n        call() {\n          this.called++;\n        }\n      };\n\n      const filter = md => spy.call(md);\n      hexo.extend.filter.register('markdown-it:renderer', filter);\n\n      const renderer = new Renderer(hexo);\n      for (let i = 0; i < iterates; i++) {\n        renderer.render({ text: '' });\n      }\n\n      hexo.extend.filter.unregister('markdown-it:renderer', filter);\n\n      spy.called.should.equal(iterates);\n    });\n  });\n\n  describe('nunjucks', () => {\n    const hexo = new Hexo(__dirname, { silent: true });\n    const loremFn = () => { return 'ipsum'; };\n    const engine = 'md';\n\n    before(async () => {\n      await hexo.init();\n      hexo.config.markdown = {};\n\n      const renderer = new Renderer(hexo);\n      function render(data, options) {\n        return renderer.parser.render(data.text);\n      }\n\n      hexo.extend.tag.register('lorem', loremFn);\n      hexo.extend.renderer.register('md', 'html', render, true);\n    });\n\n    it('default', async () => {\n      const result = await hexo.post.render(null, { content: '**foo** {% lorem %}', engine });\n      result.content.should.eql('<p><strong>foo</strong> ipsum</p>\\n');\n    });\n\n    it('enable disableNunjucks', async () => {\n      const renderer = hexo.render.renderer.get('md');\n      renderer.disableNunjucks = true;\n      hexo.extend.renderer.register('md', 'html', renderer, true);\n      const result = await hexo.post.render(null, { content: '**foo** {% lorem %}', engine });\n      result.content.should.eql('<p><strong>foo</strong> {% lorem %}</p>\\n');\n    });\n  });\n\n  describe('image options', () => {\n    const body = '![](/bar/baz.jpg)';\n\n    it('add lazyload attribute', () => {\n      hexo.config.markdown.images = { lazyload: true };\n\n      const renderer = new Renderer(hexo);\n      const result = renderer.render({ text: body });\n\n      result.should.eql('<p><img src=\"/bar/baz.jpg\" alt=\"\" loading=\"lazy\"></p>\\n');\n    });\n\n    it('keep lazyload attribute', () => {\n      hexo.config.markdown.images = { lazyload: true };\n\n      const renderer = new Renderer(hexo);\n      const result = renderer.render({ text: body });\n\n      result.should.eql('<p><img src=\"/bar/baz.jpg\" alt=\"\" loading=\"lazy\"></p>\\n');\n    });\n\n    it('should prepend root', () => {\n      hexo.config.markdown.images = { prepend_root: true };\n\n      const renderer = new Renderer(hexo);\n      hexo.config.root = '/blog';\n\n      const result = renderer.render({ text: body });\n\n      result.should.eql('<p><img src=\"/blog/bar/baz.jpg\" alt=\"\"></p>\\n');\n    });\n\n    it('alt text', () => {\n      hexo.config.markdown.images = { test: true };\n\n      const renderer = new Renderer(hexo);\n      const result = renderer.render({ text: '![alt text](/bar/baz.jpg)' });\n\n      result.should.eql('<p><img src=\"/bar/baz.jpg\" alt=\"alt text\"></p>\\n');\n    });\n\n    describe('post_asset', () => {\n      const Post = hexo.model('Post');\n      const PostAsset = hexo.model('PostAsset');\n\n      beforeEach(() => {\n        hexo.config.post_asset_folder = true;\n        hexo.config.markdown.images = {\n          prepend_root: true,\n          post_asset: true\n        };\n      });\n\n      it('should prepend post path', async () => {\n        const renderer = new Renderer(hexo);\n\n        const asset = 'img/bar.svg';\n        const slug = asset.replace(/\\//g, sep);\n        const content = `![](${asset})`;\n        const post = await Post.insert({\n          source: '_posts/foo.md',\n          slug: 'foo'\n        });\n        const postasset = await PostAsset.insert({\n          _id: `source/_posts/foo/${asset}`,\n          slug,\n          post: post._id\n        });\n\n        const expected = url_for.call(hexo, join(post.path, asset));\n        const result = renderer.render({ text: content, path: post.full_source });\n        result.should.eql(`<p><img src=\"${expected}\" alt=\"\"></p>\\n`);\n\n        // should not be Windows path\n        expected.includes('\\\\').should.eql(false);\n\n        await PostAsset.removeById(postasset._id);\n        await Post.removeById(post._id);\n      });\n\n      it('should prepend post path without slug', async () => {\n        const renderer = new Renderer(hexo);\n\n        const asset = 'img/bar.svg';\n        const slug = asset.replace(/\\//g, sep);\n        const content = `![](foo/${asset})`;\n        const post = await Post.insert({\n          source: '_posts/foo.md',\n          slug: 'foo'\n        });\n        const postasset = await PostAsset.insert({\n          _id: `source/_posts/foo/${asset}`,\n          slug,\n          post: post._id\n        });\n\n        const expected = url_for.call(hexo, join(post.path, asset));\n        const result = renderer.render({ text: content, path: post.full_source });\n        result.should.eql(`<p><img src=\"${expected}\" alt=\"\"></p>\\n`);\n\n        // should not be Windows path\n        expected.includes('\\\\').should.eql(false);\n\n        await PostAsset.removeById(postasset._id);\n        await Post.removeById(post._id);\n      });\n\n      it('should not modify non-post asset', async () => {\n        const renderer = new Renderer(hexo);\n\n        const asset = 'bar.svg';\n        const siteasset = '/logo/brand.png';\n        const site = 'http://lorem.ipsum/dolor/huri.bun';\n        const content = `![](${asset})![](${siteasset})![](${site})`;\n        const post = await Post.insert({\n          source: '_posts/foo.md',\n          slug: 'foo'\n        });\n        const postasset = await PostAsset.insert({\n          _id: `source/_posts/foo/${asset}`,\n          slug: asset,\n          post: post._id\n        });\n\n        const result = renderer.render({ text: content, path: post.full_source });\n        result.should.eql([\n          `<p><img src=\"${url_for.call(hexo, join(post.path, asset))}\" alt=\"\">`,\n          `<img src=\"${siteasset}\" alt=\"\">`,\n          `<img src=\"${site}\" alt=\"\"></p>`\n        ].join('') + '\\n');\n\n        await PostAsset.removeById(postasset._id);\n        await Post.removeById(post._id);\n      });\n\n      it('post located in subfolder', async () => {\n        const renderer = new Renderer(hexo);\n\n        const asset = 'img/bar.svg';\n        const slug = asset.replace(/\\//g, sep);\n        const content = `![](${asset})`;\n        const post = await Post.insert({\n          source: '_posts/lorem/foo.md',\n          slug: 'foo'\n        });\n        const postasset = await PostAsset.insert({\n          _id: `source/_posts/lorem/foo/${asset}`,\n          slug,\n          post: post._id\n        });\n\n        const expected = url_for.call(hexo, join(post.path, asset));\n        const result = renderer.render({ text: content, path: post.full_source });\n        result.should.eql(`<p><img src=\"${expected}\" alt=\"\"></p>\\n`);\n\n        await PostAsset.removeById(postasset._id);\n        await Post.removeById(post._id);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "test/scripts/enable_unsafe_link.js",
    "content": "'use strict';\n\n// eslint-disable-next-line no-undef\nhexo.extend.filter.register('markdown-it:renderer', md => {\n  md.validateLink = function() { return true; };\n});\n"
  }
]