Clone in a terminal:
Commit e5dc7b4
Johan Mattsson - 2026-06-02T10:48:02+00:00
e5dc7b46cecec3dfd82b174bcae2e2622030b092johan.mattsson.m@gmail.com

Compile script tag Limitation: ' will cause compiler error because rust thinks it is a character literal.

Changed files (1)

Diff

diff --git a/tests/other.rs b/tests/other.rsindex 8fe06b3..df61b97 100644--- a/tests/other.rs+++ b/tests/other.rs@@ -234,3 +234,22 @@ fn test_space() {      assert!(content.contains(expected)); }++#[test]+fn test_script_compiles() {+    let content = html! {{+        <script>+            function test() {+                let result = "TEST";++                if (result === "TEST") {+                    console.log(result);+                }++                return result;+            }+            </script>+    }};++    assert!(content.contains("TEST"));+}

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112