alexanderweiss / nova-prettier

Prettier extension for Nova
MIT License
35 stars 6 forks source link

Weird line separation #11

Closed dragoonDorise closed 4 years ago

dragoonDorise commented 4 years ago

This:

<span class="h1">Apple Marina Bay Sands abre el jueves en Singapur</span>

Get converted to:

<span class="h1"

>Apple Marina Bay Sands abre el jueves en Singapur</span >

alexanderweiss commented 4 years ago

Is this in a HTML file with a .html extension? And does the prettier playground (with the same config) (https://prettier.io/playground/) format it the same way?

dragoonDorise commented 4 years ago

It the playground works fine.

Here is the full html code: index.html.zip

alexanderweiss commented 4 years ago

It seems to be a problem with Prettier's HTML parser. If you set the playground to use the HTML parser or you use the CLI you get the same strange line break behaviour. Prettier in the extension automatically decides to use the HTML parser based on the file extension. Maybe check out the Prettier repo's issues or create one.