Files
wekan/packages/markdown
Lauri Ojansivu ed993fef84 Autolink references with an identifier and abbreviations to other tools.
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.
2026-10-08 12:22:43 +03:00
..
2020-09-05 01:36:43 +03:00
2020-09-05 01:36:43 +03:00

markdown

GitHub flavored markdown parser for Meteor based on marked.js newest version, updated by xet7.

GFM tables and linebreaks are enabled by default.

Usage

Anywhere inside your template add markdown block and write markdown inside.

Example:

{{#markdown}}

...markdown text here...

{{/markdown}}

That's it!

Thanks to:

  • Christopher Jeffrey for marked.js

  • Bozhao Yu for original meteor-markdown package (I just made this package compatible with Meteor 0.9+)

  • Bernhard Millauer - for contributions to this package

  • xet7 for updating to newest GFM package.

License

MIT