Comment indentation shifts
- Lingua principale
- TypeScript
- Stelle
- 90
- Fork
- 9
- Merge medio
- 1g 9m
- PR unite (30g)
- 3
Descrizione
## Steps
1. Visit https://stackblitz.com/edit/vitejs-vite-bcqtrm?file=x-component.ts
1. Note the comment's indentation.
1. Run `npm run format:component`.
## Expected
Comment indentation is unchanged.
## Actual
Comment is partly indented to the left and indents further with each `npm run format:component`. Compare with `npm run format:styles`, which does not use `postcss-lit`.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
The issue provides a StackBlitz link with a reproducible example in x-component.ts. Start by examining the postcss-lit plugin's handling of comment indentation in template literals. Compare the behavior of format:component (which uses postcss-lit) with format:styles (which does not). Look at the plugin's source code, likely in src/index.ts or similar, focusing on parsing and re-emission of CSS within template literals. Run the provided example to see the shifting indentation, then write a test to verify the fix.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 70/100