Shopify / prettier-plugin-liquid

Prettier Liquid/HTML plugin
https://npm.im/@shopify/prettier-plugin-liquid
MIT License
93 stars 15 forks source link

Add support for `<?xml` declarations #131

Closed charlespwd closed 1 year ago

charlespwd commented 1 year ago

Unformatted source

<?xml version="1.0" encoding="UTF-8"?>

Expected output

<?xml version="1.0" encoding="UTF-8"?>

Actual output

LiquidHTMLParsingError
charlespwd commented 1 year ago

According to MDN, Processing instructions are not valid in HTML documents (they actually declare that the document is an XML document).

I'm lowering the priority of this as I let my backburner decide what to do with this (e.g. do we switch parser? Do we not care? Do we throw an error? Do we let it as is?)

It seems like enough of an edge case to ignore.