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

Improve murmur2 to behave as JS on special chars #522

Closed pedrobslisboa closed 1 week ago

pedrobslisboa commented 2 weeks ago

Description

The murmur2 code doesn't fit well on special chars (#521)

   $ ./compare.sh 'content: "é"'
+  Hashes do not match
+  native: corivl
+  JavaScript: nawgoz
+  [1]
   $ ./compare.sh 'content: "®"'
+  Hashes do not match
+  native: 3084ue
+  JavaScript: ufik94
+  [1]
   $ ./compare.sh 'content: "😀"'
+  Hashes do not match
+  native: cqlzcw
+  JavaScript: 1u8rdd
+  [1]

How

There were some issues that without handling special char we didn't see before:

It probably worth a blog post about Int and int32 on JS and utf-16

vercel[bot] commented 2 weeks ago

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

1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **styled-ppx** | ⬜️ Ignored ([Inspect](https://vercel.com/david-sanchos-projects-8c534635/styled-ppx/FRzJiCk2ku4R9iGzehygDuJZjPQP)) | [Visit Preview](https://styled-ppx-git-feat-mumu-9c7a14-david-sanchos-projects-8c534635.vercel.app) | | Nov 19, 2024 0:22am |