Repository navigation
fix(math): keep brackets an editor escaped as text - #480
Merged
Merged
Conversation
@tiptap/markdown escapes every bracket in text, so it writes `> [!NOTE]` back as `> \[!NOTE\]`, and comark-mathml read that as display math. A GitHub alert marker, a footnote reference, words, and a leading `\[x\] ` task box now stay text, as citations already did.
|
This run was cancelled before it finished. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Latest result Pull request merged. Final answersSession Pull request merged. Session Pull request merged. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In Drop, a GitHub alert turned into a display formula after someone edited the page.
@tiptap/markdownescapes every bracket in text, so it writes> [!NOTE]back as> \[!NOTE\]. GitHub and comark-github still read that as an alert, but comark-mathml read\[!NOTE\]as\[…\]display math, so the quote rendered!NOTEas a formula. The same happened to\[draft\],\[^1\]and a\[x\] donetask line.comark-mathml's
\[rule only left citations like\[1\]as text. This PR also leaves these as text, inline and as a block:\[!NOTE\],\[!TIP\]and the rest\[^1\]\[draft\],\[see below\]\[x\]or\[X\]at the start of a paragraph, which is a task box\[x\]anywhere else, and anything with TeX in it, is still a formula, so the existing\[d\]tests don't change.The new test in
math.test.tsfails onmain(expected [ '$$!NOTE$$', '$$draft$$', … ] to deeply equal []) and passes here. I also parsed one document with the playground's plugins:main> \[!NOTE\]github-callout\alpha + \beta)Open it in the playground. It runs
mainuntil this is released, so it shows the formulas for now.pnpm readypasses.Related: vite-hub/vitehub#3956 added a workaround that rewrites
> \[!NOTE\]after Tiptap renders it. That can go once Drop has this. Tiptap escapes brackets on purpose (ueberdosis/tiptap#7898).