davesnx / styled-ppx

Type-safe styled components for ReScript, Melange and native with type-safe CSS
https://styled-ppx.vercel.app
BSD 2-Clause "Simplified" License
400 stars 32 forks source link

Fix handling comments #445

Closed zakybilfagih closed 6 months ago

zakybilfagih commented 6 months ago

Adding comment regex to correctly handle comments #441

/* nice */
    /* nice */

    /* nice */
    /* nice */

    div {
      color: red;
    }

Before: WS WS WS WS WS TAG('div') WS LEFT_BRACE RIGHT_BRACE After: WS TAG('div') WS LEFT_BRACE RIGHT_BRACE

div /*nice*/ /* nice */   /*ice*/.b {}

Before: WS TAG('div') WS WS WS DOT TAG('b') WS LEFT_BRACE RIGHT_BRACE After WS TAG('div') WS DOT TAG('b') WS LEFT_BRACE RIGHT_BRACE

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **styled-ppx** | ⬜️ Ignored ([Inspect](https://vercel.com/davesnx/styled-ppx/ADkWkHSeZFBpV86cLQEQcJaH6LvG)) | [Visit Preview](https://styled-ppx-git-fork-zakybilfagih-fix-handling-comments-davesnx.vercel.app) | | Mar 13, 2024 7:24pm |