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

How to escape dollar signs? #61

Closed
TripleCamera opened this issue Jan 30, 2024 · 8 comments
Closed

How to escape dollar signs? #61

TripleCamera opened this issue Jan 30, 2024 · 8 comments

Comments

@TripleCamera
Copy link

How to escape dollar signs if I don't want math formulas?

Source code:

$math$

\$escaped math\$

\\$double escaped math\\$

Output: All of them are displayed as math formulas. The third one has a backslash at the beginning.

_config.yml:

pandoc:
  args:
    - "-f"
    - "gfm"
    - "-t"
    - "html"
    - "--mathjax"

_config.next.yml:

math:
  mathjax:
    enable: true
@TripleCamera
Copy link
Author

None of the following could escape dollar sign, either:

  • $html escaped math$
  • $<!---->comment escaped math<!---->$
  • <span>$</span>tag escaped math<span>$</span>

😞

@uiolee
Copy link
Member

uiolee commented Feb 2, 2024

demo

inline backtick code or fenced backtick code

spec

https://spec.commonmark.org/0.31.2/#code-spans

https://spec.commonmark.org/0.31.2/#fenced-code-blocks

@uiolee
Copy link
Member

uiolee commented Feb 2, 2024

can not reproduce.

Backslashes can escape dollar signs.


hexo preview

image

@TripleCamera
Copy link
Author

can not reproduce.

Backslashes can escape dollar signs.

Which theme & math engine are you using?

@TripleCamera
Copy link
Author

@uiolee Ping~

@uiolee
Copy link
Member

uiolee commented Feb 16, 2024

with next theme and mathjax enable

image


\$sigle escaped math\\$ will works

image

@uiolee
Copy link
Member

uiolee commented Feb 16, 2024

hexo-renderer-pandoc just simply transpile markdown.In my tests, hexo-renderer-pandoc and hexo both rendered the correct results

the rendering and displaying formulas is determined by the math engine or theme.
I think this has nothing to do with pandoc or hexo

@TripleCamera
Copy link
Author

All right. I just posted a discussion at next-theme/hexo-theme-next#765.

@TripleCamera TripleCamera closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2024
@stevenjoezhang stevenjoezhang reopened this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants