mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 17:45:18 -05:00
The markdown package cannot import app code, so it carried its own copies of models/lib/externalLinkAutolink.js (#3069), externalLinkRules.js (#1463) and cardUrlAutolink.js (#2453), about 200 lines kept in step by hand and by tests that compared the source text between BEGIN/END markers. It can import an npm package, so the three files are now @wekanteam/autolink in npm-packages/autolink, a file: dependency like @wekanteam/dragscroll, and both the package and the app load that. cardUrlAutolink uses the link guard of externalLinkAutolink instead of a third copy. The tests drive the package. The ones that compared copies now check that packages/markdown imports the shared functions and defines none of them. tests/noUnescapedDynamicRegExp scans npm-packages/autolink as WeKan's own code. client/lib/secureDOMPurify.js is removed too: an older third sanitizer config, without the administrator's URL schemes, which client/imports.js loaded and nothing imported from. The app sanitizes with imports/lib/secureDOMPurify.js. Thanks to xet7 !
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