PKM-er / obsidian-editing-toolbar

An obsidian toolbar plugin, modified from the Cmenu plugin
Mozilla Public License 2.0
857 stars 30 forks source link

[Bug report] "Clear text formatting" destroys MathJAX equations. #91

Open RyotaUshio opened 1 year ago

RyotaUshio commented 1 year ago

Hi, thank you for making & maintaining this great plugin! Here's a bug report:

Describe the bug "Clear text formatting" destroys MathJAX equations.

To Reproduce Steps to reproduce the behavior:

  1. Type a MathJAX equation, e.g., $S_{n}= \sum_{i=1}^{n}a_{n}$

    image
  2. Select a region including that equation.

    image
  3. Run "Clear text formatting."

    image
  4. Some underscores in the equation were deleted, which is an unexpected behavior.

    image

Expected behavior "Clear text formatting" should ignore equations. In other words, everything between two $s should be preserved.

Desktop (please complete the following information):

Smartphone (please complete the following information): I haven't tried it on smartphones.