Closed willfaught closed 2 years ago
Looks like it's an issue with PyYAML:
>>> import yaml
>>> fm = '''title: "MacOS: It's Time To Take The Next Step"'''
>>> d = yaml.load(fm, Loader=yaml.SafeLoader)
>>> d
{'title': "MacOS: It's Time To Take The Next Step"}
# this is what frontmatter.dumps does
>>> yaml.dump(d, Dumper=yaml.SafeDumper, default_flow_style=False, allow_unicode=True)
"title: 'MacOS: It''s Time To Take The Next Step'\n"
Maybe something about SafeDumper
?
I think this was my mistake. I think it serialized using the ''
escape for apostrophes, and I later replaced ''
with '
, which then made the YAML invalid. Sorry for the confusion, and thanks for looking into it.
Say a frontmatter entry is this:
This will be serialized as
title: 'MacOS: It's Time To Take The Next Step'
, which isn't valid.