diff --git a/src/markdown/markdown.ts b/src/markdown/markdown.ts index b8cb8809..f31209ad 100644 --- a/src/markdown/markdown.ts +++ b/src/markdown/markdown.ts @@ -90,6 +90,8 @@ export const createMarkdownRenderer = ( ) // apply user config + // TODO: there is never options passed it alway empty object + console.log(options) if (options.config) { options.config(md) } diff --git a/src/markdownToVue.ts b/src/markdownToVue.ts index 65b17b91..ffb89c68 100644 --- a/src/markdownToVue.ts +++ b/src/markdownToVue.ts @@ -91,6 +91,8 @@ const inferTitle = (frontmatter: any, content: string) => { if (frontmatter.title) { return deeplyParseHeader(frontmatter.title) } + + // Here if no title or home it will take the the first # in the contect as title const match = content.match(/^\s*#+\s+(.*)/m) if (match) { return deeplyParseHeader(match[1].trim())