-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Inline Math doesn't seem to support escapes with backslash #443
Comments
The problem here is that first Python, then our Markdown parser, and then MathJax tries to handle character escaping. Python's escaping does not change anything in this case here, but our Markdown parser converts r''':math:`\\{x \in R_{index} \\}`'''
# or:
''':math:`\\\\{x \\in R_{index} \\\\}`''' We could presumably add a bit of code here that does additional escaping for math blocks before they get fed into markdown2. :) Lines 216 to 218 in e2b5930
Lines 329 to 330 in e2b5930
https://github.com/trentm/python-markdown2/blob/3f6113438ce2e776310f7c6e3f0c5a8097aefb82/lib/markdown2.py#L128-L130 |
Hi eveyone :) I was trying to find a fix today, but I think I am stuck; As @mhils points out the issue is that But there is also potentially something wierd going on in the image below where If that isnt the problem, then as far as I can tell the solution requires
Unless there is another approach? I produced the demo below that illustrates the problem. Currently VS Code doesnt support mathjax in inline documentation popups However it does treat backslashes correctly in markdown files (consistent with github markdown i think) |
Problem Description
When using the inline Math syntax
:math:
, it doesn't seem to be possible to escape curly brackets or underscores with a backslash.Steps to reproduce the behavior:
''':math:`\{x \\in R\_index \}`'''
pdoc file_directory --output-dir output_directory --math
System Information
pdoc: 12.1.0
Python: 3.9.12
Platform: Windows-10-10.0.19044-SP0
The text was updated successfully, but these errors were encountered: