mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
Admin Panel / Settings / Features could turn one "<prefix><number>" pattern into links (#3069). The reporter wanted "[Task:3384]" and "[Incident:3384]" to link to their tracker, and "[TK:1223]" with TK an abbreviation of Task. "More link rules" now takes one "<token> = <url>" per line, with {number} and {identifier} in both, and "Abbreviations" maps an identifier to the word the address needs. All rules are matched in one pass, earliest first, after the #3069 pattern, and text that is already a link is never rewritten, so no rule relinks another's link. Only an http(s) rule with exactly one {number} is used, and the values are URL-encoded into the address. The markdown package carries a copy of models/lib/externalLinkRules.js; tests/externalLinkRules.test.cjs keeps the two identical and covers the reporter's examples and the refusals. The release risk baseline records the example addresses in the new comments, and the default avatar's, which it had not. New text is in English, pending Transifex. Thanks to rzoss and xet7 ! Fixes #1463.