prettier / prettier/plugin-xml
Bug: incorrectly indenting inner elements
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 278
- Forks
- 46
- Avg merge
- 1m
- Merged PRs (30d)
- 13
Description
bracketSameLine
false
printWidth
1000
singleAttributePerLine
false
tabWidth
4
xmlWhitespaceSensitivity
preserve
xmlSelfClosingSpace
false
Input XML
<recordLookups>
<name>Get_Member_Plan</name>
<label>Get Member Plan</label>
<locationX>2164</locationX>
<locationY>566</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Is_Active_Member_Plan</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>Get_Disenrollment_Cancellation_Case_Record.Member_Plan__r.Id</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>MemberPlan</object>
<queriedFields>Id</queriedFields>
<queriedFields>Status</queriedFields>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>Get_Sales_Team_Queue</name>
<label>Get Sales Team Queue</label>
<locationX>1733</locationX>
<locationY>5996</locationY>git
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Get_Sales_Team_Users</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Type</field>
<operator>EqualTo</operator>
<value>
<stringValue>Queue</stringValue>
</value>
</filters>
<filters>
<field>DeveloperName</field>
<operator>EqualTo</operator>
<value>
<stringValue>Sales_Team</stringValue>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Group</object>
<sortField>Id</sortField>
<sortOrder>Asc</sortOrder>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
Current output XML
<recordLookups>
<name>Get_Member_Plan</name>
<label>Get Member Plan</label>
<locationX>2164</locationX>
<locationY>566</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Is_Active_Member_Plan</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>Get_Disenrollment_Cancellation_Case_Record.Member_Plan__r.Id</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>MemberPlan</object>
<queriedFields>Id</queriedFields>
<queriedFields>Status</queriedFields>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>Get_Sales_Team_Queue</name>
<label>Get Sales Team Queue</label>
<locationX>1733</locationX>
<locationY>5996</locationY>git
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Get_Sales_Team_Users</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Type</field>
<operator>EqualTo</operator>
<value>
<stringValue>Queue</stringValue>
</value>
</filters>
<filters>
<field>DeveloperName</field>
<operator>EqualTo</operator>
<value>
<stringValue>Sales_Team</stringValue>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Group</object>
<sortField>Id</sortField>
<sortOrder>Asc</sortOrder>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
Expected output XML
<recordLookups>
<name>Get_Member_Plan</name>
<label>Get Member Plan</label>
<locationX>2164</locationX>
<locationY>566</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Is_Active_Member_Plan</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>Get_Disenrollment_Cancellation_Case_Record.Member_Plan__r.Id</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>MemberPlan</object>
<queriedFields>Id</queriedFields>
<queriedFields>Status</queriedFields>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>Get_Sales_Team_Queue</name>
<label>Get Sales Team Queue</label>
<locationX>1733</locationX>
<locationY>5996</locationY>git
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Get_Sales_Team_Users</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Type</field>
<operator>EqualTo</operator>
<value>
<stringValue>Queue</stringValue>
</value>
</filters>
<filters>
<field>DeveloperName</field>
<operator>EqualTo</operator>
<value>
<stringValue>Sales_Team</stringValue>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Group</object>
<sortField>Id</sortField>
<sortOrder>Asc</sortOrder>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided XML, options, current output, and expected output, focusing on indentation of nested elements in the second recordLookups block. Trace the XML formatting and indentation entry point, then add coverage showing that inner elements retain the expected four-space nesting and verify the output matches the expected XML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100