From 3012b03c9257f8e4431054ee773c0514aa98614e Mon Sep 17 00:00:00 2001 From: oyelowo Date: Tue, 10 Oct 2023 21:42:42 -0600 Subject: [PATCH] Support more character types in arbitrary kv values --- tailwind/src/main.rs | 6 ++++++ tw-macro/src/lib.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tailwind/src/main.rs b/tailwind/src/main.rs index b41f315..a38ac34 100644 --- a/tailwind/src/main.rs +++ b/tailwind/src/main.rs @@ -24,6 +24,12 @@ fn main() { [--scroll-offset:56px] lg:[--scroll-offset:44px] btn bg-[url('/img/down-arrow.svg')] ring-white/10 bg-black/25 bg-black/[80%] bg-black/[100] bg-black/[0.75] active:hover:collapse-arrow + [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))] + + pt-8 text-base font-semibold leading-7 + + bg-[rgb(0,0,3)] absolute inset-0 bg-center + -mt-4 lg:[&:nth-child(3)]:hover:underline diff --git a/tw-macro/src/lib.rs b/tw-macro/src/lib.rs index e6f4ffc..0a64ff7 100644 --- a/tw-macro/src/lib.rs +++ b/tw-macro/src/lib.rs @@ -263,7 +263,7 @@ fn kv_pair_classname(input: &str) -> IResult<&str, ()> { let (input, _) = tag("[")(input)?; let (input, _) = take_while1(is_ident_char)(input)?; let (input, _) = tag(":")(input)?; - let (input, _) = take_while1(is_ident_char)(input)?; + let (input, _) = take_until("]")(input)?; let (input, _) = tag("]")(input)?; Ok((input, ())) }