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 code block does not correctly render \$ #2441

Closed
bravo-kernel opened this issue Mar 22, 2020 · 7 comments · Fixed by #2479
Closed

Markdown code block does not correctly render \$ #2441

bravo-kernel opened this issue Mar 22, 2020 · 7 comments · Fixed by #2479
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@bravo-kernel
Copy link
Contributor

bravo-kernel commented Mar 22, 2020

🐛 Bug Report

Inside a markdown code block, \$ is presented as $.

To Reproduce

  1. create a new docs page (.md or .mdx)

  2. add the following markdown code block:

    $here = Split-Path -Parent $MyInvocation.MyCommand.Path
    $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.'
    . "$here\$sut"
  3. view rendered page

Expected behavior

We expect to see $here\$sut on rendered page

Actual Behavior

We see $here$sut on rendered page

image

Your Environment

  • D2
  • all browsers, all OSes

Reproducible Demo

❤️

@bravo-kernel bravo-kernel added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Mar 22, 2020
@yangshun
Copy link
Contributor

It's actually an MDX bug. We previously reported it at mdx-js/mdx#902.

@yangshun yangshun removed the status: needs triage This issue has not been triaged by maintainers label Mar 22, 2020
@bravo-kernel
Copy link
Contributor Author

@yangshun thanks for confirming this one, I looked for two hours but could not find anything. Let's await their fix 👍

@bravo-kernel
Copy link
Contributor Author

for future reference: does this mean mdx-js is used for both .md and .mdx file rendering?

@yangshun
Copy link
Contributor

@bravo-kernel I doubt this bug is a serious one and it's unlikely to get prioritized. It might never be fixed.

Yes MDX is being used for both .md and .mdx

@bravo-kernel
Copy link
Contributor Author

Thanks for confirming 💯. Maybe I can motivate someone to fix this one.

@yangshun
Copy link
Contributor

Addressed in mdx-js/mdx#991

@bravo-kernel
Copy link
Contributor Author

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants