feat(config): make listsym_rejected configurable (P2)

The rejected/cancelled checkbox glyph was a hardcoded `const REJECTED = '-'`.
ListSyms now carries a `rejected` field (new_with_rejected); a per-wiki
`listsym_rejected` key (default `-`) is added to WikiConfig, and
WikiConfig::list_syms() builds the palette with it. Routed the three
config-driven ListSyms construction sites (parse path in lib.rs + the
toggle/cycle commands) through list_syms(), so a custom rejected glyph both
lexes and round-trips.

Tests: listsyms::custom_rejected_glyph_is_honoured + config round-trip.
README/doc/lua config comment updated. fmt clean; 0 Rust test failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 18:33:25 +00:00
parent 624bccbe50
commit 2d3db458fb
9 changed files with 76 additions and 17 deletions
@@ -290,6 +290,7 @@ fn raw_wiki_parses_every_new_key() {
"diary_sort": "asc",
"diary_header": "Journal",
"listsyms": "abcde",
"listsym_rejected": "",
"listsyms_propagate": false,
"list_margin": 2,
"links_space_char": "_",
@@ -305,6 +306,8 @@ fn raw_wiki_parses_every_new_key() {
assert_eq!(w.diary_sort, "asc");
assert_eq!(w.diary_header, "Journal");
assert_eq!(w.listsyms, "abcde");
assert_eq!(w.listsym_rejected, "");
assert_eq!(w.list_syms().rejected_glyph(), '✗');
assert!(!w.listsyms_propagate);
assert_eq!(w.list_margin, 2);
assert_eq!(w.links_space_char, "_");