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

Support GitHub-style backtick math syntax in Markdown #208430

Open
samestep opened this issue Mar 22, 2024 · 4 comments
Open

Support GitHub-style backtick math syntax in Markdown #208430

samestep opened this issue Mar 22, 2024 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities markdown Markdown support issues
Milestone

Comments

@samestep
Copy link
Contributor

GitHub and VS Code both render math within dollar signs, but GitHub has some known bugs when rendering math like this, such as omitting curly braces. One workaround is to double up on backslashes, but VS Code interprets these as line breaks. A more general solution is to use GitHub's alternative syntax which nests backticks inside of the dollar signs, but VS Code does not support that syntax, resulting in extraneous apostrophes.

Markdown code GitHub render VS Code render
$A = \{4, 2, 1, 3\}$ GitHub plain VS Code plain
$A = \\{4, 2, 1, 3\\}$ GitHub with double slashes VS Code with double slashes
$`A = \{4, 2, 1, 3\}`$ GitHub with backticks VS Code with backticks

Thus, as far as I'm aware there is currently no way to author Markdown math in VS Code such that the preview shows what GitHub will eventually render. It would be nice if VS Code supported the same backtick math syntax that GitHub supports, especially since it is already also supported by other platforms like GitLab.

@kilianmandon
Copy link

Totally agree with this, it is so annoying that I can't use the same syntax for vscode markdown and github.

@mjbvz mjbvz added feature-request Request for new features or functionality markdown Markdown support issues labels Apr 29, 2024
@vscodenpa vscodenpa added this to the Backlog Candidates milestone Apr 29, 2024
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@peteryongzhong
Copy link

Very annoying issue particularly when you want to put some formulae in your markdown. A little bit inconvenient to always push to GitHub to see what happens

@vscodenpa
Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities markdown Markdown support issues
Projects
None yet
Development

No branches or pull requests

5 participants