-
-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Thanks for this useful package!
I'm using it to homogenize YAML frontmatter through thousands of Markdown files but I can't figure out how to keep the source file indentation (to 4):
Input Markdown:
---
date: 2023-05-12
title: Sample
tags:
- test
- sample
---
# Title 1Script:
[...]
# write new version
with md_filepath.open(mode="w", encoding="UTF-8") as out_file:
# frontmatter.dump(content, out_file) # not working, using workaround
out_file.write(
frontmatter.dumps(content, sort_keys=False, **{"indent": 4})
)Output Markdown:
See
tagsvalues
---
processed: true
date: 2023-05-12
title: Sample
tags:
- test
- sample
---
# Title 1Metadata
Metadata
Assignees
Labels
No labels