Compare commits

..

2 Commits

Author SHA1 Message Date
Théo Marchal
12a720354d Make the search work for CJK characters 2025-09-04 23:35:53 +02:00
Théo Marchal
7b169efded Dark mode usage was broken 2025-09-04 23:26:00 +02:00
2 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,6 @@
// import { FlexSearch, Charset } from "flexsearch"
import FlexSearch from "flexsearch"
import Charset from "flexsearch"
import { ContentDetails } from "../../plugins/emitters/contentIndex"
import { registerEscapeHandler, removeAllChildren } from "./util"
import { FullSlug, normalizeRelativeURLs, resolveRelative } from "../../util/path"
@@ -15,10 +17,9 @@ interface Item {
type SearchType = "basic" | "tags"
let searchType: SearchType = "basic"
let currentSearchTerm: string = ""
const encoder = (str: string) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/)
let index = new FlexSearch.Document<Item>({
charset: "latin:extra",
encode: encoder,
charset: "cjk:extra",
encode: Charset.CJK,
document: {
id: "id",
tag: "tags",

View File

@@ -101,12 +101,12 @@ table {
& .ileft {
padding-left: 1.7rem;
background-image: linear-gradient(black, black), linear-gradient(black, black);
background-image: linear-gradient(var(--darkgray), var(--darkgray)), linear-gradient(var(--darkgray), var(--darkgray));
background-repeat: no-repeat;
background-size: 8px 2px;
background-position: top left, bottom left;
border-left: solid black;
border-left: solid var(--darkgray);
border-width: 0 2px;
}