zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

(Bug report) toc widget sometimes dont work #2962

Closed phyxnj closed 2 years ago

phyxnj commented 2 years ago

Trilium Version

0.53.1-beta

What operating system are you using?

Windows

What is your setup?

Local + server sync

Operating System Version

Windos 10

Description

In read-only mode, the toc widget cannot jump when click heading. It appear on crawled pages which the entire page is wrapped in a div tag. So the widget can't match h tag by traverse it's children.

zadam commented 2 years ago

Hi, could you please share a page where the TOC doesn't work? Either ZIP export of the note or the link where I can use the web clipper to scrape it ...

phyxnj commented 2 years ago

https://segmentfault.com/a/1190000041463008?utm_source=sf-similar-article

zadam commented 2 years ago

Thanks, but when I scrape it using "save whole page", the TOC does work for me, including the jumping.

Could you please export the problematic note and attach it here to make sure I have the exact same note as you? Thanks.

image

phyxnj commented 2 years ago

WSL2连接到宿主Windows程序的网络代理设置.txt I uploaded the file and modified the suffix to txt. In my case it doesn't work in read only mode but in write mode it works well.

zadam commented 2 years ago

Hi, thank you, I was able to reproduce the problem and fix it.