kate522 and Claude Opus 5
451b04160b
fix(comments): restore syntax highlighting for comment code blocks
...
Comment [code] blocks rendered as bare <pre><code> with only Bootstrap's
grey box — no syntax colours, unlike the reference.
The runtime gates EnlighterJS on `_win.highlight_kg`, which was hardcoded to
false. With that false the selector degrades to `pre code.gl, pre code.special`,
and comment code carries neither class, so it never highlighted. The admin
already exposes 「全局功能 → 代码高亮」 (default on), and jioData.codeHighlight
reads it — only the runtime payload disagreed.
- _win.highlight_kg / highlight_hh / highlight_zt (plus white/dark theme
names) now come from Settings::get_code_highlight_config(); the initial
theme follows cookie → mode → time-auto via initial_theme_mode()
- define those values before the _win localize (it sits above jioData in the
same method)
- inject the reference's two head rules the runtime path was missing:
max-height from `highlight_maxheight`, and
`.enlighter-toolbar{display:none}` when `highlight_btn` is off
Tests: comment-image-upload contract gains cases pinning the settings-backed
booleans (and their definition order) and the two inline CSS rules; suite
837/838 with the pre-existing frontend-lifecycle failure.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com >
2026-11-03 17:31:42 +08:00
..
2026-10-29 20:31:39 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:36:45 +08:00
2026-11-03 16:36:45 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-03 16:58:05 +08:00
2026-11-03 16:58:05 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-08-29 15:50:04 +08:00
2026-09-24 21:13:24 +08:00
2026-11-01 20:05:04 +08:00
2026-08-30 20:38:25 +08:00
2026-11-02 00:06:54 +08:00
2026-11-03 17:31:42 +08:00
2026-11-01 20:05:04 +08:00
2026-10-29 19:16:03 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-10-30 21:57:46 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-10-29 22:21:01 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-10-31 14:18:01 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 14:06:52 +08:00
2026-11-02 00:06:54 +08:00
2026-10-31 14:03:57 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 19:50:24 +08:00
2026-11-02 19:50:24 +08:00
2026-11-02 00:06:54 +08:00
2026-09-04 22:53:33 +08:00
2026-10-29 19:16:03 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:09:46 +08:00
2026-11-03 15:56:52 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:48:38 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 14:06:52 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 15:56:52 +08:00