Importing YAML header notes

Testing version: Version 2.0 (9652)

What were you doing: Importing notes with a YAML header

What feature did you use: None; the import functionality

What happened: The 3 top dashes of the YAML header were rendered as H1, the bottom 3 dashes as a divider line.

What did you expect to happen: I suspect my Preference setting is to blame as I have it set to starting each new note with a H1. I would prefer for the YAML header to be recognized, imported as is, and not rendered it in the notes list. But perhaps that’s more like a feature request.

1 Like


Can you please send me a test file for the issue reported? The result you described makes me think the YAML in the file is not valid but I want to be sure.

Hi Danilo,

Here’s the test file.

Erik Vlietinck
Freelance journalist and content writer for Fortune 500 companies and SMEs. (509 Bytes)

The problem seems to be an odd character (U+000D) between the last - of the first line and the carrier return. I’m unsure this is supposed to be a valid opening marker for the YAML front matter. Is the MD test file sent parsed correctly by some other editor/engine you are using?

Panda renders it as a code fenced paragraph. A file with this in the header saved by Panda and then dropped onto Brett Terpstra’s Marked 2 renders without the header, and iA Writer does not render it in its preview, either (both are as it’s supposed to be AFAIK).

How did you get that indeed odd character; that’s not how it is netered nor rendered on my system. Included a a screenshot of how it renders on my system, as well as the same file zipped; perhaps the transfer did something to the text file that was not supposed to happen??

Erik Vlietinck

Freelance journalist and content writer for Fortune 500 companies and SMEs.

(Attachment is missing)

Screenshot 2022-10-09 at 12.22.31 pm.png

OK, I didn’t know your system disallowed .zip files, so I’m sending you the text file again; I’ve now saved it in BBEdit so it’s absolutely 100% text-only.

Erik Vlietinck
Freelance journalist and content writer for Fortune 500 companies and SMEs. (509 Bytes)

I tried to import this file and somehow I visualize it correctly. Can you please try to re-import this very file in Bear 2 and send a screenshot of what you see?

It imported fine now. I tried creating a new one with the same header as well and that works fine now too.
Do you use remote magic? :slight_smile:

I still have a question re YAML headers. While they did import fine with the last tests I ran, they do get exported to, for example, PDFs. Is that intentional? My own preference would be to leave them out of an exported PDF, the way iA Writer does it. On the other hand, iA Writer uses the header to store variables that you can then use in the text, so there it makes sense to leave the header out of the exported result.

Yes! Or some editing happened on the file in between our messages :slight_smile:

No, YAML front matters are not supposed to be present in the exports, unless they are not recognized by our parser. This was the case for the first file version of the file you sent but, if you think this is another problem, please send a .bear file reporting this issue.

Well, it doesn’t export, it seems. The hiding of the markdown code is awesome but sometimes obfuscates code you unintentionally typed. It appears I typed the 3 back ticks after the closing 3 dashes of the header and that caused the export to fail…