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
402 stars 33 forks source link

Fix handling comments #445

Closed zakybilfagih closed 8 months ago

zakybilfagih commented 8 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 8 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 |