Skip to content
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

KaTeX Math Source should be ignored by ProseMirror inputRules #2

Open
benrbray opened this issue Sep 1, 2020 · 0 comments
Open

KaTeX Math Source should be ignored by ProseMirror inputRules #2

benrbray opened this issue Sep 1, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@benrbray
Copy link
Owner

benrbray commented Sep 1, 2020

Given a ProseMirror instance with both prosemirror-math and an input rule for automatically detecting *italic* text, type the following:

The two functions $f(n)=(5+n)*2$ and $g(n)=(n*2)+10$ are...

Since math source is currently represented as a text node, ProseMirror will scan the math source processing inputRules. In this example, it will recognize the substring *2$ and $g(n)=(n* as italic text and erase one of the math blocks.

Possible solutions:

  • keep math source in an attr instead
  • re-implement the inputRules to somehow ignore custom nodeViews
@benrbray benrbray added the bug Something isn't working label Sep 1, 2020
@benrbray benrbray self-assigned this Sep 1, 2020
@benrbray benrbray closed this as completed Sep 1, 2020
@benrbray benrbray reopened this Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant