From 9c5e78ccfb9e0ec99eac237a4f5dcc03cbb8067c Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Fri, 12 Dec 2025 21:51:57 -0800 Subject: [PATCH] bug fix --- docs/access-map-viewer/index.html | 45 ++++++++++++++++++++++++------- src/main.rs | 30 ++++++++++----------- src/matcher.rs | 7 +---- 3 files changed, 52 insertions(+), 30 deletions(-) diff --git a/docs/access-map-viewer/index.html b/docs/access-map-viewer/index.html index fef75f6..38d1b40 100644 --- a/docs/access-map-viewer/index.html +++ b/docs/access-map-viewer/index.html @@ -23,8 +23,14 @@ --radius: 8px; --hover: #1f2937; --table-header: #0f172a; - --code-bg: #0f172a; + --code-bg: #0d1526; --code-border: #1f2937; + --code-border-strong: rgba(56, 189, 248, 0.4); + --code-text: #e2e8f0; + --code-accent: rgba(56, 189, 248, 0.08); + --link-strong: #a5f3fc; + --link-strong-hover: #e0f2fe; + --link-underline: rgba(255, 255, 255, 0.35); } :root[data-theme="light"] { @@ -44,8 +50,14 @@ --success: #059669; --hover: #e5e7eb; --table-header: #f9fafb; - --code-bg: #0f172a; - --code-border: #1f2937; + --code-bg: #f8fafc; + --code-border: #e5e7eb; + --code-border-strong: rgba(14, 124, 86, 0.2); + --code-text: #0f172a; + --code-accent: rgba(14, 124, 86, 0.08); + --link-strong: #1d4ed8; + --link-strong-hover: #1e3a8a; + --link-underline: rgba(30, 64, 175, 0.35); } * { box-sizing: border-box; } @@ -408,15 +420,26 @@ /* Finding detail snippet */ .snippet-box { - background: var(--code-bg); - color: #e5e7eb; + position: relative; + background: linear-gradient(90deg, var(--code-accent), transparent), var(--code-bg); + color: var(--code-text); padding: 16px; - border-radius: 6px; + border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; overflow-x: auto; white-space: pre; border: 1px solid var(--code-border); + box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--code-border-strong); + } + + .snippet-box::after { + content: ""; + position: absolute; + inset: 0; + border-radius: 8px; + pointer-events: none; + box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02); } #fd-validation-box { @@ -458,12 +481,16 @@ .link-mono a { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; - color: #1d4ed8; - text-decoration: none; + color: var(--link-strong); + text-decoration: underline; + text-decoration-color: var(--link-underline); + text-decoration-thickness: 2px; + font-weight: 600; word-break: break-all; } .link-mono a:hover { - text-decoration: underline; + color: var(--link-strong-hover); + text-decoration-color: currentColor; } /* Search & pagination */ diff --git a/src/main.rs b/src/main.rs index ea751a0..3026579 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,27 +5,27 @@ // * Fallback - system allocator (`system-alloc` feature) // ──────────────────────────────────────────────────────────── -// // --- jemalloc (opt-in) --- -// #[cfg(feature = "use-jemalloc")] -// #[global_allocator] -// static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; +// --- jemalloc (opt-in) --- +#[cfg(feature = "use-jemalloc")] +#[global_allocator] +static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; -// // --- mimalloc (default) --- -// #[cfg(all(not(feature = "use-jemalloc"), not(feature = "system-alloc")))] -// #[global_allocator] -// static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; - -// // --- system allocator (explicit opt-out) --- -// #[cfg(feature = "system-alloc")] -// use std::alloc::System; -// #[cfg(feature = "system-alloc")] -// #[global_allocator] -// static GLOBAL: System = System; +// --- mimalloc (default) --- +#[cfg(all(not(feature = "use-jemalloc"), not(feature = "system-alloc")))] +#[global_allocator] +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; +// --- system allocator (explicit opt-out) --- +#[cfg(feature = "system-alloc")] use std::alloc::System; +#[cfg(feature = "system-alloc")] #[global_allocator] static GLOBAL: System = System; +// use std::alloc::System; +// #[global_allocator] +// static GLOBAL: System = System; + use std::{ io::{IsTerminal, Read, Write}, sync::{Arc, Mutex}, diff --git a/src/matcher.rs b/src/matcher.rs index b694cf1..0317214 100644 --- a/src/matcher.rs +++ b/src/matcher.rs @@ -663,14 +663,9 @@ fn filter_match<'b>( has_named_captures || capture_count > 2 }; - let validation_bytes = if use_full_match { - full_bytes - } else { - entropy_bytes - }; + let validation_bytes = if use_full_match { full_bytes } else { entropy_bytes }; match char_reqs.validate(validation_bytes, Some(context), respect_ignore_if_contains) { - // // --- END FIX --- PatternValidationResult::Passed => {}