Skip to content

Support GitHub-style backtick math syntax in Markdownย #208430

Open
@samestep

Description

@samestep

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.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesmarkdownMarkdown support issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions