Skip to content

Add support for Frontmatter #389

Open
@jlangeveld

Description

Plugin Version

v2.1.0

Prettier Version

v2.6.2

Which frameworks are affected?

  • none
  • vue
  • angular
  • svelte

Node Version

v18.3.0

Which operating systems have you used?

  • Linux
  • macOS
  • Windows

Prettier config

{

}

Input

---
title: Hello world
---
doctype
html
  head
    title= title
  body
    h1 Hello world

Output or Error

- --
title: Hello world
- --
doctype
html
  head
    title= title
  body
    h1 Hello world

Expected Output

---
title: Hello world
---
doctype
html
  head
    title= title
  body
    h1 Hello world

Additional Context

This makes pug templates unusable in frameworks like eleventy, which parse and use the frontmatter keys.

Metadata

Labels

type: feature requestFunctionality that introduces a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions