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

Add suport for math expressions #214

Closed
ThomasTNO opened this issue Oct 22, 2021 · 1 comment · Fixed by pypi/warehouse#12149
Closed

Add suport for math expressions #214

ThomasTNO opened this issue Oct 22, 2021 · 1 comment · Fixed by pypi/warehouse#12149

Comments

@ThomasTNO
Copy link

It would be interesting if we could add support for math expressions, in line with the GitLab flavored markdown.
https://docs.gitlab.com/ee/user/markdown.html#math

@miketheman
Copy link
Member

Thanks for the suggestion! This renderer relies heavily on https://github.com/theacodes/cmarkgfm , which in turn relies on https://github.com/github/cmark-gfm - and that syntax would need to support math , not this renderer.

See github/cmark-gfm#6 and commonmark/cmark#439 for upstream issues.

miketheman added a commit to miketheman/warehouse that referenced this issue Aug 30, 2022
We can configure MathJax to detect the convention of single dollar signs
in addition to its other methods, as it's not on by default.

The inline script needs to be supported by our CSP, and if the stanza
ever changes, we'll need to recalculate the hash and update the CSP
accordingly.

Resolves pypi#12009
Resolves pypa/readme_renderer#214

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
ewdurbin added a commit to pypi/warehouse that referenced this issue Aug 30, 2022
We can configure MathJax to detect the convention of single dollar signs
in addition to its other methods, as it's not on by default.

The inline script needs to be supported by our CSP, and if the stanza
ever changes, we'll need to recalculate the hash and update the CSP
accordingly.

Resolves #12009
Resolves pypa/readme_renderer#214

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants