From c8962676cf0196f38df09ed548d97240d4b2198f Mon Sep 17 00:00:00 2001 From: Ryan Atkinson Date: Tue, 8 Oct 2024 14:20:51 -0600 Subject: [PATCH] wip --- src/lib/css_class_helpers.test.ts | 1 + src/lib/css_class_helpers.ts | 2 +- src/lib/styles.test.ts | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/css_class_helpers.test.ts b/src/lib/css_class_helpers.test.ts index 07043efd..b507d5ae 100644 --- a/src/lib/css_class_helpers.test.ts +++ b/src/lib/css_class_helpers.test.ts @@ -19,6 +19,7 @@ const values: Array<[contents: string, expected: string[]]> = [ ['class:a', ['a']], ['class:a ', ['a']], ['class:a=', ['a']], + ['class:a>', ['a']], // `classes=` prop ['classes="a"', ['a']], ['classes="a b"', ['a', 'b']], diff --git a/src/lib/css_class_helpers.ts b/src/lib/css_class_helpers.ts index 3f631885..9fbf868a 100644 --- a/src/lib/css_class_helpers.ts +++ b/src/lib/css_class_helpers.ts @@ -8,7 +8,7 @@ export interface Css_Extractor { const CSS_CLASS_EXTRACTORS: Css_Extractor[] = [ // `class:a` { - matcher: /(?]+)/gi, mapper: (matched) => [matched[1]], }, // initial capture group is fake just because the second regexp uses a capture group for its back reference diff --git a/src/lib/styles.test.ts b/src/lib/styles.test.ts index 876e5581..b46b45e0 100644 --- a/src/lib/styles.test.ts +++ b/src/lib/styles.test.ts @@ -1,11 +1,11 @@ import {test} from 'uvu'; import * as assert from 'uvu/assert'; -import styles from '$lib/styles.css?raw'; +import main_stylesheet from '$lib/style.css?raw'; import * as exported_variables from '$lib/variables.js'; // TODO BLOCK generate all styles here? only in memory? // style_animations, style_components, -const css_files = [styles]; +const css_files = [main_stylesheet]; const extract_custom_properties = (css: string) => Array.from(css.matchAll(/--([a-z][a-z0-9_]*(? m[1]);