Skip to content

yaml frontmatter not handled correctly #1361

@whispersnowleopard

Description

@whispersnowleopard

I've noticed that my markdown files with yaml frontmatter show up in the preview pane with the formatting all messed up.

  • disregards carriage returns
  • treats last line before frontmatter end markdown string "---" as a title

While working on this, suggest to also consider what is the desired behavior for frontmatter. In the example below, VS Code hides yaml-formatted frontmatter, and I believe that is the most common default behavior. Displaying frontmatter is also a valid choice IMO but ofc it should be an intentional design decision.

Example images below.

VS Code (correct formatting applied):
Image

MacDown (incorrect formatting):
Image

example images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions