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

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

Open janklostermann opened this issue 1 year ago • 2 comments

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 avatar Mar 17 '24 14:03 janklostermann

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).

janklostermann avatar Mar 17 '24 15:03 janklostermann

Good idea.

gera2ld avatar Mar 18 '24 03:03 gera2ld

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

janklostermann avatar Apr 10 '24 06:04 janklostermann

It will be released in the next version.

gera2ld avatar Apr 12 '24 10:04 gera2ld

Fixed in v0.1.4

gera2ld avatar Apr 21 '24 16:04 gera2ld

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.

janklostermann avatar Apr 22 '24 07:04 janklostermann