Closed Kimi-Arthur closed 1 year ago
Thanks for the detailed bug report, I'll have a look :+1:
I wonder how local links work: text ok, but how to set the destination? html style with does not work, also
I miss that aspect in the documentation. If i dont know how it should work by intention, i dont know whether it is ok.
I think this extension generates the id for each section title automatically, which is pretty nice and works if referenced in the same page.
The autoscroll behavior was updated in v5.1 Now the extension either scrolls to the last known position in the page or to a header if a hash fragment is present in the URL. I'm closing this issue for now, but let me know if that works for you.
This is what I observed: If there is a link to another local md file with section title, like
[text](../some_file.md#section-1)
, it will open it, but won't scroll to the position. And if you modify the current url toSection-1
, it will scroll there. Capitalisation is not the problem, it's just another url for the section.Also, if I'm opening the same page in another tab with a new section id, it won't scroll (it will stick to the old location).
What I guess: When the page first loads, there is no such an id like
section-1
, as maybe the extension hasn't processed the page yet. However, after the page loads and I change the url in the same tab, the page knows that id and will scroll.