You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent some time wondering why a Markdown file with YAML front-matter had stopped parsing correctly, until I realised that po4a (or one of the text handling libraries) is interpreting the BOM as a regular character in the same line as the YAML document separator (---), and so it believes the whole front-matter block is a Markdown paragraph.
This source snippet (BOM char shown as <feff>
<feff>---
title: Quick security recommendations for your devices
post_date: 2023.10.17
author: Security in a Box
published: true
teaser_image: ../../../media/en/blog/polygonal-hand-holding-smartphone.png
teaser: "See whare are few first effective steps one can take to better protect their Android, iOS/iPhone, Windows, Mac and Linux devices"
---
Is extracted as:
#. type: Plain text#:src/blog/quick-security-recommendations-for-your-devices/index.md:8msgid ""
"<feff>--- title: Quick security recommendations for your devices post_date: "
"2023.10.17 author: Security in a Box published: true teaser_image: ../../../"
"media/en/blog/polygonal-hand-holding-smartphone.png teaser: \"See whare are "
"few first effective steps one can take to better protect their Android, iOS/"
"iPhone, Windows, Mac and Linux devices\""
msgstr ""
If I remove the BOM, then parsing is fixed:
#. type: Yaml Front Matter Hash Value: author#:src/blog/quick-security-recommendations-for-your-devices/index.md:1#, no-wrapmsgid"Security in a Box"msgstr""#. type: Yaml Front Matter Hash Value: teaser#:src/blog/quick-security-recommendations-for-your-devices/index.md:1#, no-wrapmsgid"See whare are few first effective steps one can take to better protect their Android, iOS/iPhone, Windows, Mac and Linux devices"msgstr""#. type: Yaml Front Matter Hash Value: teaser_image#:src/blog/quick-security-recommendations-for-your-devices/index.md:1#, no-wrapmsgid"../../../media/en/blog/polygonal-hand-holding-smartphone.png"msgstr""
The text was updated successfully, but these errors were encountered:
I spent some time wondering why a Markdown file with YAML front-matter had stopped parsing correctly, until I realised that po4a (or one of the text handling libraries) is interpreting the BOM as a regular character in the same line as the YAML document separator (
---
), and so it believes the whole front-matter block is a Markdown paragraph.This source snippet (BOM char shown as
<feff>
Is extracted as:
If I remove the BOM, then parsing is fixed:
The text was updated successfully, but these errors were encountered: