marp-team / marp-vscode

Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode
MIT License
1.55k stars 72 forks source link

Custom themes are not displayed after export if only .md file is open #418

Open taunnol opened 1 year ago

taunnol commented 1 year ago

How to reproduce: 1) Open your .md file with presentation, not a whole project folder 2) Add a custom theme, specify the relative path to it in the settings 3) Theme will be displayed in preview 4) Export in any format 5) The exported presentation has a default theme, no errors appear in the console

This is very confusing, since the theme is visible in the preview, and the pictures (also relative) work great.

yhatt commented 1 year ago

Thanks! I guess this is a misdetection of the base directory for the specified relative path when exporting Markdown via Marp CLI. https://github.com/marp-team/marp-vscode/blob/5dbd2439249d5df614e4e8e605d048bf16be53a0/src/option.ts#L102-L110