markmap/markmap-vscode

[Improvement] TOC node should focus relevant header on click

Akv2021 opened this issue · 1 comments

If the Table of Contents is present in markdown, then it'll also show up as nodes.
On clicking any content in table of contents that header should be accessible i.e.

  • From below sample file, On clicking "Para 1" in markmap, it should
  1. either open the md file with that section in focus (same as clicking on "Para 1" in TOC inside Markdown file.) OR
  2. Focus on "Para 1" node in Markmap. [Preferred since we are navigating in same file/view]
  • Currently it tries to open a file named #para-1 in the same directory. Which results in a "file not found" view.

Sample file

# Main Header
## Sub Header 1
### Para 1
- This is my content


## Sub Header 2
1. There's more content.

# Main Header 2
- line 1
- line 2

It'll have the following TOC

- [Main Header](#main-header)
  - [Sub Header 1](#sub-header-1)
    - [Para 1](#para-1)
  - [Sub Header 2](#sub-header-2)
- [Main Header 2](#main-header-2)

And Following MarkMap
image

is this issue resolved?