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

Issue with triggering comment in math environment #941

Closed
warpmatrix opened this issue Apr 29, 2021 · 1 comment
Closed

Issue with triggering comment in math environment #941

warpmatrix opened this issue Apr 29, 2021 · 1 comment
Labels
Area: Math Needs Discussion We haven't decided what to do.

Comments

@warpmatrix
Copy link

Problem

  • What went wrong: If I trigger comment in math environment ($$...$$) by typing Ctrl+/, the line will be wrapped by the comment in html style, which is <!-- -->, and the comment will be showed in the preview.
  • Expected behavior: However, it ought to be wrapped by the comment in latex style I guess, which is % at the beginning of the line.
  • Your environment: The extension version is 3.4.0 with all settings default.

I notice that behaviors in math environment is different from normal environment. For example, an "itemize" environment doesn't be triggered in math environment. So the issue above can be fixed? Although it is a trivial issues, it will be handier if the issue is fixed.

How to reproduce

Here is an example:

$$
<!-- html\ comment\ by\ typing\ ctrl+/ -->
% latex comment
$$

preview

Besides, it seems nothing suspicious in the console.

@yzhang-gh
Copy link
Owner

It looks like embeddedLanguages can help with this. But we still have a problem: KaTeX is not LaTeX so we shouldn't mark it as LaTeX.

#846 (comment)

cc @Lemmingh

@yzhang-gh yzhang-gh added Area: Math Needs Discussion We haven't decided what to do. labels Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Math Needs Discussion We haven't decided what to do.
Projects
None yet
Development

No branches or pull requests

2 participants