-
Notifications
You must be signed in to change notification settings - Fork 118
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
Use of escape.Markdown for #text elements #7
Comments
@chamilad great that you like the library! If the following snippet gets run through the library
With escaping, this input will generate this output which is not perfect but close to the original. @chamilad if you send me some snippets that behave unexpectedly, I'm happy to add some test cases and fix that. As a Background Information: This library was designed to pipe whole websites through it, meaning it is supposed to handle some weird edge cases. |
Hi there! First, thanks for a great library! Second, I have an example that behaves unexpectedly: The document I'm converting contains maths equations such as If this is a corner case that breaks something else, then I'm happy to just write my own rule to override the default one, just thought I'd mention this. |
@estyrke Yeah, you are right that is a bug. Unfortunately, it's not that easy to fix. I have thought about a new approach that might make escaping more reliable (also resolving #19), but that requires a substantial refactor. And I don't have time for that at the moment 🤷♂️ For now, you can create a custom rule for "span" and register it using Then check whether the element has the classname “tex2jax_process” using If it has return If it does not have the classname, return Let me know if you have any problems... |
Hello,
I'm using your library for a markdown generation tool for static site generators. The Rule interface is just perfect!
The use of escape for #text elements mostly seem like a problem for me as I read through the code. Would you be able to explain why this was used in the first place? I couldn't understand why certain characters needed to be escaped in the first place.
Thanks!
The text was updated successfully, but these errors were encountered: