breadcrumbs icon indicating copy to clipboard operation
breadcrumbs copied to clipboard

Bug: v4: Codeblocks don't update correctly in editing view

Open soulsynapse opened this issue 11 months ago • 2 comments

Describe the bug If you use codeblock, navigate away, then navigate back, the codeblock will be for the previous page you navigated to.

Desktop, v. 4.0.15-beta

To Reproduce

  1. Make a codeblock like this in editing mode:
type: tree
dir: down
  1. Click a link on one of the links in the codeblock
  2. Click back
  3. Codeblock will have the tree for the previous page

Expected behavior Should have the tree for the current page

Screenshots n/a

Desktop (please complete the following information):

  • OS: windows 11
  • Version 4.0.15-beta

Smartphone (please complete the following information): n/a

Additional context Is there another way to have an updated breadcrumb list?

soulsynapse avatar Mar 02 '24 01:03 soulsynapse

Looks like this is how dataview does it, making an editor extension

https://github.com/blacksmithgu/obsidian-dataview/blob/e4a6cab97b628deb22d36b73ce912abca541ad42/src/main.ts#L183

https://github.com/blacksmithgu/obsidian-dataview/blob/e4a6cab97b628deb22d36b73ce912abca541ad42/src/ui/render.ts

some background

https://forum.obsidian.md/t/registermarkdownpostprocessor-callback-not-called-with-live-preview-mode/56049/2

I'm bad at programming

soulsynapse avatar Mar 02 '24 04:03 soulsynapse

Thank you for the issue and links :)

SkepticMystic avatar Mar 02 '24 07:03 SkepticMystic

Here's a work-around for this:

I have it set to a stylized header on my Breadcrumbs note so I can just embed the list in the floating callout.

Still working on formatting, but it works pretty well. Bonus: if I want to change it across all my notes, I only have to update it in one place.

image

soulsynapse avatar Mar 16 '24 16:03 soulsynapse