Closed hoverwars closed 1 month ago
EDIT: It occured on a mermaid block too
@hoverwars thanks for reporting this issue!
Could you share a minimal reproduction project (either a public github repo or a zip upload of the code here)? I'll take a look when I have time.
@hoverwars I found https://github.com/CommunityToolkit/ColorCode-Universal/issues/36 which appears to basically be the same issue that you reported here. The root cause exists over in that library, which this extension uses as a dependency.
Please report your issue there to add some urgency. It also looks like some workarounds were posted which may be helpful for you. Closing this issue out, as there isn't anything to address in this package.
Thank you for your help. I'm sorry, I didn't take the time this week to create the repository you asked. Have a good day !
Thank you for your help. I'm sorry, I didn't take the time this week to create the repository you asked. Have a good day !
Not a problem! I was able to use some of the examples you provided to build a small repro app to test locally. That let me drill down to observe ColorCode-Universal as being the root cause and then I found that related issue.
If you find any other issues with this library, feel free to open another issue and I'll be happy to help!
Description
I'm developping an AI chat that can generate code. I use your package to colorate the code. Sometimes, the coloration seems to be stuck in an infinite loop, making my application freeze. What I know:
Expected Behaviour
The generation working, even for incomplete code blocks
Actual Behaviour
The coloration seems to be stuck in an infinite loop.
Affected Version
2.3.0
Steps to Reproduce
Markdig.Markdown.ToHtml(response, _pipeline)
Examples
Here are some examples that cause the program to be stuck. Note that the not closing tag "```json" is on purpose, because the problem occurs during the AI answer, so the generation cannot end.
Another one (doesn't stuck but take ~1 second to colorate):
I have these that might help you. Crash
Don't crash
Don't crash
In my opinion, it might be related to the usage of spaces in a non-closing double quote Let me know if you need more informations
Checklist