jrblevin / markdown-mode

Emacs Markdown Mode
http://jblevins.org/projects/markdown-mode/
GNU General Public License v3.0
885 stars 161 forks source link

Fontification gets irritated for long texts #728

Open quazgar opened 1 year ago

quazgar commented 1 year ago

For longer markdown documents, markdown-mode sometimes (hard to reproduce) switches the highlighting in the middle of some texts, without and special characters in the vicinity.

See the following image for an example screenshot: image

Expected Behavior

The highlighting should only change at special characters.

Actual Behavior

The highlighting sometimes appears to be a bit random, with long range interactions: If this bug appears and I change text further up the documents, the errors may seem to move around, sometimes disappear, sometimes reappear again.

Steps to Reproduce

I was not able to reproduce this issue reliably. It only happened for long documents, and sometimes restarting Emacs helps. M-x normal-mode typically only helps for a short time.

Backtrace

Software Versions

syohex commented 1 year ago

Could you give us the long markdown text which occurs this issue ?

quazgar commented 1 year ago

I am sorry, that specific file is too confidential. But I will post the next example that I can give to the public.

More importantly, I will try to find a way to reproduce the behavior. It does not show on loading the file, but only after some editing. Actually reloading the file (M-x normal-mode) sometimes, but not always, helps to reset markdown-mode's state.

njsand commented 1 year ago

In the issue description, when you say "without and special characters in the vicinity" do you mean "without any special characters?" Just not quite sure what you're trying to say there - maybe just a typo.

quazgar commented 5 months ago

Sorry for the long delay. Yes, it was just a type, I meant "any".

As the screenshot shows, there are no special characters in the word "processes", for example. This is what I meant, the fontification changes from one character to another, without any special characters in between.