hexojs / hexo-renderer-markdown-it

Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.
MIT License
341 stars 60 forks source link

Conflict when markdown-it-sup and markdown-it-mathjax plugin enabled #124

Open billchen2k opened 3 years ago

billchen2k commented 3 years ago

Eg. markdown text: $\forall i \ge 0, uv^iwx^iy \in L $

And the rendered result is:

image

The symbol ^ in latex and symbol ^ in markdown will affect each other and equations won't be rendered properly. Can this be solved?

This is my markdown-it config file in hexo:


markdown:
  render:
    html: true
    xhtmlOut: false
    breaks: true
    linkify: true
    typographer: false
    quotes: '“”‘’'
  plugins:
    - markdown-it-abbr
    - markdown-it-footnote
    - markdown-it-ins
    # - markdown-it-sub
    # - markdown-it-sup
    - markdown-it-deflist
    - markdown-it-imsize
    - markdown-it-mark
    - markdown-it-regexp
    - markdown-it-mathjax
    - markdown-it-task-checkbox
    - name: markdown-it-emoji
      options:
        shortcuts: {}
  anchors:
    level: 2
    collisionSuffix: 'v'
    permalink: true
    permalinkClass: header-anchor
    permalinkSymbol: ''