Add configuration

This commit is contained in:
2026-07-28 09:35:15 +02:00
parent 547cd123da
commit 80f24bcfa8
12 changed files with 629 additions and 41 deletions

20
theme_test.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import "testing"
func TestApplyThemeChangesAllRenderingThemes(t *testing.T) {
defer func() {
if err := applyTheme("dark"); err != nil {
t.Fatal(err)
}
}()
if err := applyTheme("light"); err != nil {
t.Fatal(err)
}
if markdownStyleName != "light" || codeHighlightTheme != "github" {
t.Fatalf("light theme did not propagate: markdown=%q code=%q", markdownStyleName, codeHighlightTheme)
}
if err := applyTheme("unknown"); err == nil {
t.Fatal("unknown theme was accepted")
}
}