Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown list rendering problem when the list item contains equations #889

Closed
5 of 11 tasks
panqiincs opened this issue May 28, 2019 · 11 comments · Fixed by #1004
Closed
5 of 11 tasks

Markdown list rendering problem when the list item contains equations #889

panqiincs opened this issue May 28, 2019 · 11 comments · Fixed by #1004

Comments

@panqiincs
Copy link

I agree and want to create new issue


Expected behavior

Open Mathjax of a post by writing mathjax: true, all markdown list items display properly.

Actual behavior

Open Mathjax of a post by writing mathjax: true, when the item contains equations, it does not display properly

For exmaple, the following markdown:

Please check the following items:

+ The equation $E=m^2$
+ No equations

and more:

1. I have a symbol $x$
2. I don't have a symbol
3. I also have a symbol $y$

The result is:

Screenshot_20190528_113323

Steps to reproduce the behavior

  1. Open Mathjax for a post by writing mathjax: true at the beginning
  2. Write equation in list items
  3. Generate page and check
  • Link to demo site with this bug: N/A
  • Link(s) to source code or any usefull link(s): N/A

Node.js and NPM Information

v11.15.0
6.9.0

Package dependencies Information

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.8.0"
  },
  "dependencies": {
    "hexo": "^3.8.0",
    "hexo-deployer-git": "^1.0.0",
    "hexo-generator-archive": "^0.1.5",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.2.2",
    "hexo-generator-index": "^0.2.1",
    "hexo-generator-sitemap": "^1.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-related-popular-posts": "^3.0.5",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-marked": "^0.3.2",
    "hexo-renderer-stylus": "^0.3.3",
    "hexo-server": "^0.3.3"
  }
}

Hexo Information

Hexo version

hexo: 3.8.0
hexo-cli: 1.1.0
os: Linux 4.19.45-1-MANJARO linux x64
node: 11.15.0
v8: 7.0.276.38-node.19
uv: 1.29.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 67
nghttp2: 1.36.0
napi: 4
llhttp: 1.1.1
http_parser: 2.8.0
openssl: 1.1.1b
cldr: 35.1
icu: 64.2
tz: 2019a
unicode: 12.1

Hexo Configuration

NexT Information

NexT Version:

  • Latest Master branch
  • Latest Release version
  • Old version

NexT Scheme:

  • All schemes
  • Muse
  • Mist
  • Pisces
  • Gemini

NexT Configuration:

math:
  enable: true

  # Default (true) will load mathjax / katex script on demand.
  # That is it only render those page which has `mathjax: true` in Front-matter.
  # If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
  per_page: true

  engine: mathjax
  #engine: katex

  # hexo-renderer-pandoc (or hexo-renderer-kramed) needed to full MathJax support.
  mathjax:
    cdn: //cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML
    #cdn: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML

    # See: https://mhchem.github.io/MathJax-mhchem/
    #mhchem: //cdn.jsdelivr.net/npm/mathjax-mhchem@3
    #mhchem: //cdnjs.cloudflare.com/ajax/libs/mathjax-mhchem/3.3.0

  # hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) needed to full Katex support.
  katex:
    cdn: //cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css
    #cdn: //cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css

    copy_tex:
      # See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
      enable: false
      copy_tex_js: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.js
      copy_tex_css: //cdn.jsdelivr.net/npm/katex@0/dist/contrib/copy-tex.min.css

Other Information

@panqiincs panqiincs added the Bug label May 28, 2019
@panqiincs panqiincs changed the title Markdown list render problem when the list item contains equations Markdown list rendering problem when the list item contains equations May 28, 2019
@1v9
Copy link
Member

1v9 commented May 28, 2019

Thanks to Bugjax 😂

https://github.com/theme-next/hexo-theme-next/commits/master/source/css/_common/components/third-party/math.styl
https://github.com/theme-next/hexo-theme-next/commits/master/layout/_third-party/math/mathjax.swig

1.gif

GitHub
Elegant and powerful theme for Hexo. Contribute to theme-next/hexo-theme-next development by creating an account on GitHub.
GitHub
Elegant and powerful theme for Hexo. Contribute to theme-next/hexo-theme-next development by creating an account on GitHub.

@panqiincs
Copy link
Author

@1v9 You mean it is a mathjax bug and cannot fix it in NeXT?

@jiangtj
Copy link
Member

jiangtj commented May 29, 2019

Sure this is a problem that needs to be fixed. But it seems a little difficult.

@1v9
Copy link
Member

1v9 commented May 29, 2019

@1v9 You mean it is a mathjax bug and cannot fix it in NeXT?

No but it's complicated. See #645 #658 #669 #721 #745 #752.

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented May 29, 2019

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented May 29, 2019

Duplicate of #745, See also: #645

This problem is really annoying because it is a browser bug instead of design error.

We can't fix it.
@jiangtj

@jiangtj
Copy link
Member

jiangtj commented May 29, 2019

@stevenjoezhang How about remove overflow in li? Strange issue...

@jiangtj
Copy link
Member

jiangtj commented May 29, 2019

image
Is it possible to add to ul?

@jiangtj
Copy link
Member

jiangtj commented May 29, 2019

It seems that overflow and li are conflicting in browser now, and should not be used at the same time.

@jiangtj
Copy link
Member

jiangtj commented May 29, 2019

image
image
Or wrap with div ...

@stevenjoezhang
Copy link
Contributor

Fixed in #1004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants