You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typing an equation like "$$x^2 + y^2 = z^2$$" via "Insert Equation" and then pressing the MarkdownShortcutPlugin changes the equation to inline ($...$).
Lexical version: Current Playground version
Steps To Reproduce
Enter an equation, e.g. "x^2 + y^2 = z^2" via the toolbar (Insert -> Insert Equation) and uncheck "inline".
Block math equations like "$$...$$" are converted to inline "$...$" when using the ##MarkdownShortcutPlugin.
The expected behavior
Block math equations like "$$...$$" should stay the same when using the MarkdownShortcutPlugin.
Potential Solutions
Possibly quick: A new BLOCK_EQUATION transformer could be added to address the "$$" scenario. MarkdownTransformers
Way more complicated: One might migrate "$, $$" in general to modern LaTex syntax like "[...]"
Impact of fix
Users who rely on markdown capabilities are type safe with equations.
The text was updated successfully, but these errors were encountered:
I may be wrong but I dont think there is a need for a new transformer... The issue might stem from EQUATION only handling inline. if its possible to accommodate both inline and block.
i tried to rewrite the EQUATION but it seems buggy and crashed the playground editor lol.
I agree that a single transformer could probably handle both cases, but it needs to be implemented correctly. I would recommend writing up some unit tests, it's probably an issue with your regexes (it usually is, that syntax is tricky).
Typing an equation like "$$x^2 + y^2 = z^2$$" via "Insert Equation" and then pressing the MarkdownShortcutPlugin changes the equation to inline ($...$ ).
Lexical version: Current Playground version
Steps To Reproduce
Link to code example: https://playground.lexical.dev/
The current behavior
Block math equations like "$$...$$" are converted to inline "$...$" when using the ##MarkdownShortcutPlugin.
The expected behavior
Block math equations like "$$...$$" should stay the same when using the MarkdownShortcutPlugin.
Potential Solutions
Possibly quick: A new BLOCK_EQUATION transformer could be added to address the "$$" scenario. MarkdownTransformers
Way more complicated: One might migrate "$, $$" in general to modern LaTex syntax like "[...]"
Impact of fix
Users who rely on markdown capabilities are type safe with equations.
The text was updated successfully, but these errors were encountered: