-
Notifications
You must be signed in to change notification settings - Fork 17
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
Inline latex doesn't allow punctuation following the ending $ #193
Comments
Ya I think that could work. Can you create a PR and add a couple tests? |
It looks like we would need to update the look ahead to This will prevent a match if one of the following are true:
I think this might be too lenient and allow other types of markdown that is not katex or prevent matching other valid katex. The other alternative could be to list specific punctuation that we do allow I am also not an expert in katex so I don't know if there is a valid case of nested katex that would have punctuation after For example: (im not sure if this is valid katex) If we do decide to list valid punctuation, what punctuation should we allow? |
Thanks for looking into this 👍 Good find about the autolink, I didn't consider that. An explicit list of punctuation that's allowed, just like the autolink example, sounds like a better idea than the broad If this list is fine then I can create a PR with tests maybe today or tomorrow. The punctuation list can always be revised if there are any further issues. |
Ya that list works for me 👍 |
Hi
When I try to include an inline equation I can't seem to put punctuation after the ending
$
. The following examples don't work unless I put a space before the period or comma:Putting a space in any of those locations really doesn't look good, and I think it's incorrect to include the punctuation in the equation itself.
I took a quick look at the regex and I wonder if it's possible to change the final look-ahead from
(=?\s|$)
to(=?\W|$)
. The non-word class\W
includes spaces, but also common punctuation, which would resolve my issue.marked-katex-extension/src/index.js
Line 4 in afea812
The text was updated successfully, but these errors were encountered: