Bug: pugAttributeSeparator='as-needed' breaks quotes of the preceding attribute value #255
Closed
2 of 7 tasks
Labels
type: bug
Functionality that does not work as intended/expected
Plugin Version
v1.16.0
Prettier Version
v2.3.2
Which frameworks are affected?
Node Version
v10.19.0
Which operating systems have you used?
Prettier config
Input
Output or Error
Expected Output
Additional Context
When using the option pugAttributeSeparator: as-needed, the pugin breaks quotes around attribute values, which are followed by atleast one space before comma and the following attribute key/value pair.
This can seen in the 5th line of my example:
will get rewritten by the plugin as:
When I rerun it the 2nd time, it ends up correctly, as:
With more than 2 attributes, it only breaks the ones which have atleast one space before the comma and the following attributes, but correctly sets up the attribues, which are immediately followed by a comma.
Without the singleQuote: true option, it will break the quotes to the single quotes. Put simply, it always breaks the quotes since it applies exactly the opposite of what you have set.
The text was updated successfully, but these errors were encountered: