Skip to content

Issue: FrontMatter changes front matter line length #518

@davidsneighbour

Description

@davidsneighbour

Describe the bug
It appears the frontmatter functionality that updates the dates on save is also formatting the frontmatter. I have a line with the length of >80, but below 120 and after each save that line is ripped onto two lines. Now, while this is done properly (yaml, second line of a parameter is indented by 2 extra spaces) it might/will break other parsers that want to go over frontmatter. It would be nice to be able to either configure it to a certain line length or be able to disable it.

I am not 100% sure that it is FrontMatter doing this, but I disabled all Markdown extensions, eslint and prettier and it still cut the line in two, after disabling frontmatter this stopped.

sample:

---
date: 2023-02-26T21:27:05+07:00
publishDate: 2023-02-26T21:27:05+07:00
lastmod: 2023-02-27T17:20:47+07:00
resources:
  - src: header.jpg
    title: Photo by [Todd Quackenbush](https://unsplash.com/@toddquackenbush) via [Unsplash](https://unsplash.com/)
---

ends up as:

---
date: 2023-02-26T21:27:05+07:00
publishDate: 2023-02-26T21:27:05+07:00
lastmod: 2023-03-01T18:50:15+07:00

resources:
  - src: header.jpg
    title: Photo by [Todd Quackenbush](https://unsplash.com/@toddquackenbush) via
      [Unsplash](https://unsplash.com/)
---

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions