Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bug: incorrectly indenting inner elements

Aperta
#986 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
javascript
Ambito
tooling

Direzione di ricerca

Riproduci il problema con l'XML fornito, le opzioni, l'output attuale e l'output atteso, concentrandoti sull'indentazione degli elementi annidati nel secondo blocco recordLookups. Traccia il punto di ingresso della formattazione e dell'indentazione dell'XML, quindi aggiungi una copertura che mostri che gli elementi interni mantengono l'annidamento previsto di quattro spazi e verifica che l'output corrisponda all'XML atteso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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>
Lingua principale
JavaScript
Stelle
278
Fork
46
Merge medio
1m
PR unite (30g)
13

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di prettier/plugin-xml

Tutte le issue di prettier/plugin-xml

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.