Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

No so pretty XML formatting by prettier #632

Closed
sbidoul opened this issue Feb 8, 2020 · 2 comments · Fixed by #640
Closed

No so pretty XML formatting by prettier #632

sbidoul opened this issue Feb 8, 2020 · 2 comments · Fixed by #640

Comments

@sbidoul
Copy link
Member

sbidoul commented Feb 8, 2020

Example on mis_builder/report/mis_report_instance_qweb.xml

image

@yajo WDYT ?

@yajo
Copy link
Member

yajo commented Feb 10, 2020

Not so pretty indeed... I guess this is a risk with formatters.

How about opening the issue against https://github.com/prettier/plugin-xml?

Have you tested adding ignore tags?

@sbidoul
Copy link
Member Author

sbidoul commented Feb 29, 2020

prettier/plugin-xml#40 addresses this.

So we probably need to add xmlWhitespaceSensitivity: ignore in .prettierrc.yml to let it indent correctly (i.e. when there is whitespace only between tags).

sbidoul added a commit to acsone/maintainer-quality-tools that referenced this issue Mar 1, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
In order to let prettier indent xml
correctly, it has to consider whitespace between tag
as non significant. It should be
a safe default for odoo-related xml files.

fixes OCA#632
sbidoul added a commit to acsone/maintainer-quality-tools that referenced this issue Mar 2, 2020
In order to let prettier indent xml
correctly, it has to consider whitespace between tag
as non significant. It should be
a safe default for odoo-related xml files.

fixes OCA#632
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants