Skip to content

Bug: incorrectly indenting inner elements #986

Description

@FedeAbella

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>

Activity

  1. FedeAbella commented on Mar 27, 2026

    @FedeAbella
    Author

    I don't know if this makes it clearer, but the first <recordLookups> block is correctly indented, but in the second <recordLookups> block, the inner elements and the closing tag for <connector> and <filters> get "unindented":

    Image

    (The yellow gutter lines show where Prettier made changes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions