Possible regression: distracting "flicker" each time a document is edited and the preview updates

Viewed 10

Hi! I've been using Marked for many years, currently alongside Obsidian as my primary editor, and I've just upgraded from Marked 2.6.46 to the latest Marked 3.0.39. The new support for things like Obsidian's callouts is excellent and I'm looking forward to setting up custom processor rules that suit my particular use cases, but I've found I'm now experiencing an annoying regression.

Specifically, each time I edit my document in Obsidian and it saves to disk, the entire Marked preview disappears for a moment, being replaced by a blank white or grey screen momentarily before the new version of my document appears. I'm using dark mode, so the bright white screen is especially annoying. Once the updated preview has loaded, Marked then needs to scroll itself from the top of the document back down to where I've been editing. This isn't how Marked 2 behaved: when my document was edited, the old version would immediately be swapped out for the new version with no intermediate stage. The former scroll position would often be preserved as well, rather than the preview being momentarily reset to the top. This behaviour produced a much more seamless experience similar to using Obsidian's own preview pane feature.

I'm using the MultiMarkdown processor with the Ink style in both versions of Marked, and the document I'm working on is somewhat large but not that large (currently 137 KB). I've also tested with much smaller documents (19 KB) and experienced the same problem, although the moment of flicker is shorter. Is there a setting I can change in Marked 3 to make it behave more like the previous version, or is this effectively just a bug that needs fixing? Having it open as a side-by-side preview while I write is simply too distracting if each update is going to be so visually drastic, especially with Obsidian's automatic saving.

1 Answers

I understand that this would be annoying. Marked 3 updates in the same way later versions of Marked 2 did, by replacing the contents without reloadiung the document. Whatever you're seeing is a bug, and I'll look into it. Could you use Help->Report an Issue to send me your configuration and a sample document?

I'm wondering if Obsidian is doing an atomic rewrite that causes Marked to temporarily think the file has been deleted, then reload it when it appears again, which I'll have to test.