io12 / org-fragtog

Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
MIT License
404 stars 14 forks source link

Plugin doesn't work in markdown mode #50

Open ms-afk opened 4 months ago

ms-afk commented 4 months ago

Description and steps to reproduce In markdown-mode, the plugin fails to render the latex fragments, outputting this error:

Warning (org-element-cache): org-element--cache: Org parser error in test.md::5. Resetting.
 The error was: (error "rx ‘**’ range error")
 Backtrace:
nil

The above error only occurs when a markdown header is present, similarly to this issue.

For instance the file used to generate the above error was this:

# H
$\omega$

While a markdown file with just latex code will work perfectly (even switching on and off if the cursor is on/off the code snippet), for example:

$\omega$

(I'm not sure if this is to be considered a org-fragtog bug or a emacs orgmode bug)

Version and environment