-
Notifications
You must be signed in to change notification settings - Fork 52
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
Code blocks buggy in markdown renderer #3592
Comments
Possibly it had 2 spaces? I think I prefer the explicit fenced code for code. So that should go.
Could not reproduce this. |
The cause of these is we have 3 extensions in place to handle code in markdown -> html:
They interact, sometimes weirdly. |
Do note: the email's are being de-obfuscated by the original TreeParser already if it happens to be within a targeted add-class tag! |
Err... return mark_safe(new_html) |
Work in progress! It will have tests but indeed: that should not go there! |
You can remove a for loop I think: for element in soup.find_all([*self.tag_class_dict.keys()]):
current_classes = element.get("class", [])
element["class"] = [*current_classes, *self.tag_class_dict[element.name]] |
After serveral different appoaches I had the hunch of pre-escaping the character/entity references. Working PR is out. |
Could we maybe add to this the issue of inline code blocks?
on github:
It appears to be interpreted as inline code with newlines removed. As if the input is: |
Is that the behaviour on Chris' branch? |
Yes, tested this with Chris' branch. |
Not sure if this is easily fixable. The relevant markdown extenion documents:
I can give superfences a kick, but I do know that there is some tight coupling between the |
We already have that 3rd party library installed, bigger question is how it affects the rest of the site. |
Okay, it's a limitation I could live with. Putting the code at the document root level is exactly how I fixed the documentation page where I ran into this issue. (SuperFences would be very nice to have though.) |
MarkDown such as:
Should render as:
shouldn't be a code block
But actual result is:
Note:
The text was updated successfully, but these errors were encountered: