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

Can't use markdown-it-mathjax3 plugin because of \n replacement from src attribute #265

Closed
profanat opened this issue Sep 4, 2021 · 1 comment

Comments

@profanat
Copy link

profanat commented Sep 4, 2021

Describe the bug
If you use markdown-it-mathjax3 plugin with q-markdown then you can't use any math expressions starting with \n like \notin because \n is getting replaced. Source code of the replacement https://github.com/quasarframework/quasar-ui-qmarkdown/blob/dev/ui/src/components/QMarkdown.js#L155

To Reproduce
Steps to reproduce the behavior:

  1. Add markdown-it-mathjax3:
    onExtend(mdi) {
    const mdMathJax = require("markdown-it-mathjax3");
    mdi.use(mdMathJax);
    },
  2. Create q-markdown component:
    <q-markdown :extend="onExtend" :src="` $$A \\setminus B = \\{ x\\mid x\\in A \\text{ and } x \\notin B\\}.$$ `"></q-markdown>

Expected behavior
image

Screenshots
image

Suggested solution
Add property to NOT do the \n replacement

hawkeye64 added a commit that referenced this issue Sep 6, 2021
@hawkeye64
Copy link
Member

Fixed in QMarkdown v2.0.0-alpha.6.
If you need this for v1.x let me know.

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

2 participants