Sources/OrgCore/Config/ThemeTables.swift
10 lines · 526 bytes
1/// The tables of config.toml the theme reads: `[theme]` and `[theme.…]`.
2public enum ThemeTables {
3 /// Keys of `[theme]` that aren't colors; config.toml's settings handle them.
4 public static let typeKeys: Set<String> = ["font", "body-font", "font-size", "line-spacing", "text-width", "heading-size-step", "theme-file", "light-theme", "dark-theme"]
5
6 /// Whether a table holds theme colors.
7 public static func isThemeTable(_ name: String) -> Bool {
8 name == "theme" || name.hasPrefix("theme.")
9 }
10}