manuth / MarkdownConverter

Provides the functionallity to convert Markdown-files to html, png, or pdf using vscode.
MIT License
37 stars 11 forks source link

Variable Substitution does not work when chaining documents #175

Open karmeye opened 2 years ago

karmeye commented 2 years ago

Hello @manuth

Running the Chain all Documents command the variables are not set.

Whether referring to them in the same md file they were defined or another file. Nothing is rendered. However if a varible is set as a header, e.g. ## {{ Title }} then it is rendered Untitled-1.

Thx

manuth commented 2 years ago

Hi @karmeye I feel like this will bring up a lot of questions I haven't considered or thought about so far.

Currently, MarkdownConverter creates a blank document and pastes the content of all markdown files it can find into said document. After that, it will convert the document mentioned before.

This document is not saved to the disk which is why you end up with the Title being Untitled-1. In this process, all yaml variables are basically getting thrown away.

I'm not sure on how to go on further with this. I have some questions in mind I need to think about before being able to implement some alternative which is why I haven't assigned this issue to the upcoming milestone.

The questions being: