-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Labels
lang:htmlIssues affecting HTML (and SVG but not JSX)Issues affecting HTML (and SVG but not JSX)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier 2.0.5
Playground link
--parser htmlInput:
---
layout: foo
---
Test <a href="https://prettier.io">abc</a>.Output:
TypeError: Cannot read property 'end' of undefined
at hasLeadingLineBreak (https://prettier.io/lib/standalone.js:21471:71)
at hasSurroundingLineBreak (https://prettier.io/lib/standalone.js:21467:12)
at preferHardlineAsTrailingSpaces (https://prettier.io/lib/standalone.js:21463:108)
at preferHardlineAsLeadingSpaces (https://prettier.io/lib/standalone.js:21459:68)
at printBetweenLine (https://prettier.io/lib/standalone.js:22701:155)
at https://prettier.io/lib/standalone.js:22623:48
at FastPath.map (https://prettier.io/lib/standalone.js:16730:23)
at printChildren$1 (https://prettier.io/lib/standalone.js:22600:26)
at Object.genericPrint$2 [as print] (https://prettier.io/lib/standalone.js:22491:41)
at callPluginPrintFunction (https://prettier.io/lib/standalone.js:16921:20)Expected behavior:
I would expect prettier to format the html file with yaml front matter.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang:htmlIssues affecting HTML (and SVG but not JSX)Issues affecting HTML (and SVG but not JSX)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.