lainsce / quilter

[DEPRECATED] Focus on your writing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

commented

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.

commented

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..

commented

Try it out on GNOME Builder:

  1. Clone this repository there with the "Clone Repository…" button
  2. Click the Run button on the headerbar
  3. Create a file with YAML like this:
---
title: Testing
author: John Doe
date: February 13, 2021
---

This is a test file.
  1. Check preview. :)

well Well WELL WELL. That did the trick! Behold:

Testing

This is a test file

commented

So it's fixed then. Closing :P