After enabling the plug-in, PDF export will output will output Front Matter.
- [x] The Plugin is up to date
- [x] Obsidian is up to date
Describe the bug After enabling the plug-in, PDF export will output will output Front Matter.
To Reproduce Steps to reproduce the behavior:
- Install and enable this plugin.
- Open the file containing Front Matter.
- excute command "Export to PDF..."
Expected behavior As before enabling the plugin, there will be no output of the Front Matter yaml
Screenshots
md file:
PDF file (Not Enable this plugin):
PDF file (Enable this plugin):
Occurs on
- [x] Windows
- [ ] macOS
- [ ] Linux
- [ ] Android
- [ ] iOS
Plugin version 0.3.2
Additional context Newly created Obsidian Vault with only this plugin enabled.
Thanks for creating this issue, I had the same problem and couldn't figure out why this was occurring.
The YAML is output with the same styling as applied to codeblocks:
this is still there and quite annoying. Any chance to fix this?
I think you can exclude properties from the highlighted "languages", and that fixes it.
Thanks, @cncastillo ! just excluding 'properties' helps. Don't forget to Reload Highlighter, though.
This should go into the documentation and IMHO properties should be an excluded language by default. It took me the better part of 30min to find out which plugin was the culprit for this behaviour.
I tested this, and it seems like properties does not help, but excluding yaml does. So this does not help with the PDF export, since I don't want to globally disable YAML highlighting.
Though it seems like I found a fix for the issue. I will test it a bit more, and if it works correctly, I will release a fix.
if (el.parentElement?.classList.contains('mod-frontmatter')) {
return;
}
Should be fixed in 0.5.1