-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
micromark: render shouldn't freeze the page if jump source and destination are equal #186
Comments
Welcome @OEvgeny! 👋 While not stated here, that looks a lot like ChatGPT generated math. |
Adding a line like - **LaTeX Formatting for Clarity**: When presenting math, use LaTeX with "`$...$`" for inline math (e.g., `$x^2 + y^2 = z^2$`) and "`$$...$$`" for display math (e.g., `$$\int x^2 \, dx$$`). to the LLM prompt resolves the issue without needing a customer tokenizer. |
sigh I see this is related to microsoft/BotFramework-WebChat#5353 |
Hi! Thanks for reaching out! Because we treat issues as our backlog, we close issues that are questions since they don’t represent a task to be completed. See our support docs for how and where to ask questions. Thanks, |
Correct, we need
I saw some assertions for tokens are already in place. I don't see why such simple assertion is not welcomed, even if it's not met in micromarks code, rather a result of buggy tokenizer extension.
It doesn't, another part of the PR does though.
Unfortunately we're forced to use the different flavor of markdown. I'm not happy about it as well. |
I'd defer some to @wooorm on this. |
Assertions are indeed only in development mode. They are compiled away. Are you running in development mode? If you are running in production mode, it is very likely that you are missing all the assertions.
Which PR? Especially backslashes, and especially square brackets, are already highly used in markdown. Better to use something else. Markdown is not a good grammar. How it all hangs together is complex and everything interacts with each other. It is a goal to allow extensions, but: not everything is possible. |
Not sure which build I'm using, but from the screenshot above: On the line 2702 you can spot Could add the check into the function calculating jumps array. Or at least don't emit such entries.
Updated the original quote to include the context.
We'll keep this in mind, thank you.
I feel the same, that's why I opened the issue, this seems like an easy improvement to make both DX and UX better. |
If you're not sure, probably the production build. |
Initial checklist
Affected packages and versions
[email protected] and its dep [email protected]
Link to runnable example
https://bolt.new/~/sb1-7ektru or https://stackblitz.com/edit/sb1-7ektru
Steps to reproduce
Environment details provided directly in the repro. Please use built-in terminal to verify versions.
Expected behavior
While the extension could have mistakes in token placement, I think it's still expected that parser won't hang during such error. EIther such jumps should be omitted or bail.
Actual behavior
Page hangs in an infinite while loop (line 2698 on the screenshot).
Runtime
Other (please specify in steps to reproduce)
Package manager
Other (please specify in steps to reproduce)
OS
Other (please specify in steps to reproduce)
Build and bundle tools
Vite
The text was updated successfully, but these errors were encountered: