markmap / markmap-vscode

Integrate markmap into VSCode
https://marketplace.visualstudio.com/items?itemName=gera2ld.markmap-vscode
MIT License
228 stars 22 forks source link

Feature Request: Markmap root defined by Frontmatter YAML value 'title:' #52

Closed janklostermann closed 7 months ago

janklostermann commented 8 months ago

Hello, Thanks so much for your plugin. It is so helpful!

To become more compatible with mindmap-exports to markdown (e.g. from freeplane) and save a level of headline hierarchy I have the following suggestion:

Situation now

With more than one h1-header (#) there is no root of the mindmap. export from freeplane:

test title
# header 1
## header 1.1
## header 1.2
# header 2
## header 2.2

image

Suggested improvement

The root of the mindmap could be easily added without refactoring the complete hierarchy by simply using a "title" value from markdowns YAML frontmatter. With that, I would only need to extend the first line to become the frontmatter.

---
title: test title # used as root of the mindmap
---
# header 1
## header 1.1
## header 1.2
# header 2
## header 2.2

image

janklostermann commented 8 months ago

In case there is only one h1-headline (#) in the markdown, it is probably best to ignore the YAML frontmatter value title and use this single h1-header as root (as is the current behaviour).

gera2ld commented 8 months ago

Good idea.

janklostermann commented 7 months ago

Great! Thanks so much for implementing this improvement so quickly!

gera2ld commented 7 months ago

It will be released in the next version.

gera2ld commented 7 months ago

Fixed in v0.1.4

janklostermann commented 7 months ago

Thanks so much! Works like a charm!

Am 21. April 2024 18:02:51 MESZ schrieb Gerald @.***>:

Fixed in v0.1.4

-- Reply to this email directly or view it on GitHub: https://github.com/markmap/markmap-vscode/issues/52#issuecomment-2068108352 You are receiving this because you authored the thread.

Message ID: @.***> -- Von /e/ Mail gesendet.