mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
The viewer (mentions -> markdown) applies alwaysShowCodeAsText via a ReactiveVar (Markdown.alwaysShowCodeAsText) that only a separate startup Tracker.autorun kept in sync with the setting. But the mentions helper re-renders whenever the settings doc changes (it reads getCurrentSetting for renderLinksAsPlainText/stripLinks), and that re-render often runs BEFORE the bridge autorun updated the ReactiveVar — so the inner markdown helper read the stale flag and rendered links/markdown normally (clickable), and since mentions does not depend on that ReactiveVar it never re-rendered again. Net effect: toggling "Always show all code as plain text" did nothing (links stayed clickable, code stayed rendered), even after reload (same race on load). Fix: set Markdown.alwaysShowCodeAsText inside the mentions helper, from the same reactive getCurrentSetting() it already reads, BEFORE rendering the inner markdown via Blaze.toHTML. The markdown helper now always reads the up-to-date flag in the same synchronous render, so the toggle takes effect immediately in every rich-text field (card titles, descriptions, comments, checklists). The startup autorun stays for any direct +markdown use outside a viewer.