I write many more LaTeX equations than dollar amounts, but I recognize that I am in the minority. For accessibility, prosemirror-math should have a standard (but configurable) way of escaping $ characters.
Negative lookbehinds are currently only supported in new-ish versions of Chrome and FireFox
Sometimes, the input rules will accidentally latch on to a $ symbol in a distant node and assume the user wants to create a math block.
Solutions to consider:
Modify ProseMirror's InputRule implementation to support escape sequences before a matched string
By default, prosemirror-math should assume all $'s are math-related, unless the user explicitly indicates otherwise. For example, any of the following actions should create an escaped $
use a backslash \$ to escape math
or put a space after the dollar sign $ to escape math (automaticaly remove the space)
I write many more LaTeX equations than dollar amounts, but I recognize that I am in the minority. For accessibility,
prosemirror-math
should have a standard (but configurable) way of escaping$
characters.At the moment, the default inline input rule uses a negative-lookbehind regex to avoid inserting math nodes, but this has a few limitations:
Solutions to consider:
InputRule
implementation to support escape sequences before a matched stringprosemirror-math
should assume all $'s are math-related, unless the user explicitly indicates otherwise. For example, any of the following actions should create an escaped$
\$
to escape math$
to escape math (automaticaly remove the space)