Quilter should not preview YAML
johnblommers opened this issue · comments
I prefer to put a YAML header in my Markdown files. It should not be displayed in the preview pane. Quilter does display the YAML.
Consider enhancing Quilter to hide the YAML in the preview pane.
Meanwhile the workaround is to remove the YAML block from the Markdown file.
What does the YAML usually contain? It could be useful to use it in some way instead of hiding it.
Example of YAML I use in my Markdown documents:
title: Journal Apps for Linux
author: John Blommers
date: June 7, 2018
toc: true
toc-depth: 4
toccolor: Purple
language: en
In practice the YAML is parsed by Pandoc and when generating a PDF from the Markdown it will use the "toc" fields to generate the table of contents.
Oh, I see; yeah, Quilter doesn't use pandoc, it uses another markdown converter to preview it, called discount, and this is why the YAML passes through. I guess I should change it to remove this on the preview..
Try it out on GNOME Builder:
- Clone this repository there with the "Clone Repository…" button
- Click the Run button on the headerbar
- Create a file with YAML like this:
---
title: Testing
author: John Doe
date: February 13, 2021
---
This is a test file.
- Check preview. :)
well Well WELL WELL. That did the trick! Behold:
Testing
This is a test file
So it's fixed then. Closing :P