We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description: I encountered a problem with the @prettier/plugin-xml plugin. When an XML file contains the text:
<value>''</value>
Prettier rewrites it as:
<value> ' ' </value>
This formatting adds an unwanted space between the apostrophes, which disrupts the appearance of our system.
Steps to Reproduce:
<root> <value>''</value> </root>
Expected Behavior: The content of the <value> tag should remain <value>''</value> without adding spaces.
<value>
Actual Behavior: The content of the <value> tag is rewritten as:
Additional Information: In other cases, when there is only one apostrophe, Prettier formats correctly by keeping the line together:
<values> <field>ITA_IFM_ActivityDescription__c</field> <value xsi:type="xsd:string">MEDIA COMPLESSITA'</value> </values>
This leads us to believe it is a minor bug. Could you please provide feedback?
Prettier Configuration:
{ "plugins": ["prettier-plugin-apex", "@prettier/plugin-xml"], "printWidth": 600, "singleQuote": true, "trailingComma": "all", "bracketSpacing": false, "useTabs": true, "bracketSameLine": true, "apexInsertFinalNewline": false, "overrides": [ { "files": "*.{trigger,cls}", "options": {"parser": "apex"} }, { "files": "*.{apex}", "options": {"parser": "apex-anonymous"} }, { "files": "**/lwc/**/*.html", "options": {"parser": "lwc"} }, { "files": "*.{cmp,page,component,evt}", "options": { "parser": "html", "trailingComma": "none" } }, { "files": "**/aura/**/*.js", "options": {"trailingComma": "none"} }, { "files": "**/aura/**/*.{auradoc,design,app}", "options": {"parser": "angular"} }, { "files": "**/*.xml", "options": { "parser": "xml", "useTabs": false, "tabWidth": 4, "xmlWhitespaceSensitivity": "preserve", "embeddedLanguageFormatting": "off", "xmlSelfClosingSpace": false } } ] }
and this is our package.json
package.json
{ "name": "***", "version": "1.0.0", "author": "***", "devDependencies": { "@prettier/plugin-xml": "^3.4.1", "prettier": "^3.4.2", "prettier-plugin-apex": "^2.2.2" }, "repository": { "type": "****", "url": "****" }, "scripts": { "prettier": "prettier" }, "dependencies": { "sfdx-plugin-source-read": "^1.4.0" } }
Thanks in advice, i'm here if you need anything else 😊
The text was updated successfully, but these errors were encountered:
Have you news about this bug?
Sorry, something went wrong.
Excuse me, can I at least know if you consider this a bug?
No branches or pull requests
Description:
I encountered a problem with the @prettier/plugin-xml plugin. When an XML file contains the text:
Prettier rewrites it as:
This formatting adds an unwanted space between the apostrophes, which disrupts the appearance of our system.
Steps to Reproduce:
Expected Behavior:
The content of the
<value>
tag should remain<value>''</value>
without adding spaces.Actual Behavior:
The content of the
<value>
tag is rewritten as:Additional Information:
In other cases, when there is only one apostrophe, Prettier formats correctly by keeping the line together:
This leads us to believe it is a minor bug. Could you please provide feedback?
Prettier Configuration:
and this is our
package.json
Thanks in advice, i'm here if you need anything else 😊
The text was updated successfully, but these errors were encountered: