Closed SettingDust closed 1 year ago
Hey @SettingDust , thanks for the advice. I have wrapped the value in frontmatter with double quotes in the default template. You can check the latest release. Next, I will update the document.
Double-quoted titles containing double quotes are broken (and were before too)
Change some text field defaults in the template to multiline YAML
title: "Answers to "What is the meaning of life?" - My Blog" # parsing issue
title_new: > # works great
Answers to "What is the meaning of life?" - My Blog
Double-quoted values containing unescaped double quotes are invalid YAML. Double-quoted strings also parse escape sequences (which may be unintended). Single quotes are often a better choice for YAML when unquoted won't work, but the rules for deciding if/which quotes to use are complex. Multiline
A multi-line string as the default template will resolve most simple issues with special characters.
This also may be useful for the author
value in some cases.
I'm using this for my template now:
---
id: {{id}}
title: >
{{{title}}}
{{#author}}
author: >
{{{author}}}
{{/author}}
…
nice hack @jpj625 seems like we should do this for all attributes that come from the user/content.
Hey @SettingDust and @jpj625 , the default template is updated to wrap author
and title
in the multiline string.
Please check it out
There will be some characters can't be handled by yaml without quotes Should wrap in default template