markmap-vscode icon indicating copy to clipboard operation
markmap-vscode copied to clipboard

[Improvement] TOC node should focus relevant header on click

Open Akv2021 opened this issue 2 years ago • 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

Akv2021 avatar Jun 10 '23 10:06 Akv2021

is this issue resolved?

Giessen avatar May 23 '24 01:05 Giessen

@gera2ld Please let me know if you have any questions or need clarification.

Akv2021 avatar Nov 23 '24 17:11 Akv2021