Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions scripts/theme-check-ci.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $ } from "bun";
import { loadThemes, parseTheme } from "../src/core/theme";
import { checkThemes, type ThemeFile } from "./check-themes";
import { checkThemes, slugify, type ThemeFile } from "./check-themes";
import { renderDiffPreview, renderPreview } from "./render-theme-preview";

const base = process.env.BASE_SHA;
Expand Down Expand Up @@ -73,7 +73,12 @@ async function catalogueOf(dir: "core" | "community") {
}

function pathOf(theme: { name: string }, dir: "core" | "community"): string {
return `themes/${dir}/${theme.name.toLowerCase().replace(/[^a-z0-9]+/g, "-")}.toml`;
// Must use the SAME slugify as the filename rule (check-themes.ts), which
// strips accents via NFD. The old inline version turned "é" into a hyphen
// ("Rosé" → "ros-"), so an accented theme's reconstructed path never matched
// its real file ("rose-..."); the exclusion failed and the theme collided
// with itself as "already exists". Only accented names hit it.
return `themes/${dir}/${slugify(theme.name)}.toml`;
}

const catalogue = [
Expand Down