tokenshift / obsidian-progress-clocks

Progress clocks and other useful widgets for https://obsidian.md/.
MIT License
2 stars 2 forks source link

Inline Clock Replacing Code Block #8

Closed Willowlark closed 3 months ago

Willowlark commented 3 months ago

I have a JSON file property that I'm displaying on a page via a dataviewjs query like so

dv.el("code", dv.current()["json"], {cls: "HyperMD-codeblock HyperMD-codeblock-begin HyperMD-codeblock-begin-bg HyperMD-codeblock-bg cm-line"})

When I have the plugin enabled, when I enter reading view instead of displaying the codeblock it's supposed to I get

image

The word clock is in the json text, is there an aggressive filter for inline clock search? Is there a way to disable inline? It's a big problem that it wipes out the entire display for me.

tokenshift commented 3 months ago

Yeah, something's clearly matching the code block too aggressively. Will look into it.

For my own notes/reference: I see the same thing in:

I'm also seeing it sometimes render the clock at first, then switch to showing the codeblock after a few seconds; no idea what's provoking that switch, and it's pretty inconsistent.

tokenshift commented 3 months ago

Just pushed out v0.3.1 which should fix this (regexes for clock and counter were missing start-of-string anchors 😬). Thanks for reporting this!

Willowlark commented 3 months ago

I didn't expect a fix so fast! Thanks, this worked great and I love what you've done with the plugin =)