- The General/ level is gone: its 109 files moved up into the folders of the same name, and its topic table is the "Shared topics" section of Features.md. - Accessibility is one folder, docs/Features/Accessibility/, with the Admin Panel's accessibility page in it. - Every folder's main page is README.md (110 X/X.md pages renamed with git mv, five merged with an existing README.md, 26 index pages added for folders that had none), so a folder opened on GitHub shows its page. - The 73 "# Moved" forwarding pages are deleted, with the folders that held only them; every link that went to one goes to its final page. - docs/Features/README.md has the website's "Features in WeKan" overview, each feature linking to its page here. 1,129 Markdown links in 262 files and 352 doc paths in code, tests, compose, snap and release files follow. tests/docsFeaturesLayout.test.cjs fails when General/ or a "# Moved" page comes back, a folder has no README.md, or a relative link in the docs or README.md does not resolve. Thanks to xet7 !
Markdown
What it is
Markdown is a light way to format text with ordinary characters: **bold**,
# heading, - list, [link](https://example.com). WeKan renders Markdown in card titles and
descriptions, comments, checklists, list and swimlane titles and many other
places, so the text you type shows formatted.
UPDATE: Wekan now uses markdown-it and markdown-it-emoji plugin, see Emoji page.
Read more
- Markdown on Wikipedia, CommonMark, and GitHub Flavored Markdown:
- markdown-it, the renderer WeKan uses now.
- Adding markdown to more places at Wekan progress
- Related formatting tips for numbered lists
- Checklist on markdown - fixed, see below.
- WeKan pages: Markdown editor, Numbered text, Emoji, LaTeX.
How to use it
Where can I use the markdown?
- Card name.
- Board name - Works on board view only.
- Card description, list and task list.
- Comments, checklist items, list and swimlane titles.
Numbered text. If in List titles you like to create numbered text like this:
3. Something
Write it this way (to escape dot), so it shows correctly:
3\. Something
See Numbered text.
Task lists. - [ ] Task and - [x] Done show a checkbox. The checkbox is
not clickable: it shows the state written in the text
(#2419; the old note "Checklist on
markdown does not work yet" no longer applies).
How the numbers are calculated
Markdown has no numbers of its own here; ordered lists are numbered as described in Numbered text.
How it works in WeKan
History: Wekan used GFM (Github Flavored Markdown) through the project that ported GFM to Meteor, https://github.com/wekan/markdown, a fork of https://github.com/perak/markdown. Note: In order to use gfm checklist and other v0.28+ features, you need Wekan v2.61+. That port is no longer used.
Now:
- The
markdownpackage in this repository, packages/markdown/src/template-integration.js, sets up markdown-it withhtml,linkifyandbreakson, the emoji and math plugins, a task-list rule, and highlight.js for fenced code blocks. markdown-it's own~~strikethrough~~works because the sanitizer keeps thes,delandstriketags. - Every result is cleaned by packages/markdown/src/secureDOMPurify.js; only the URL schemes an administrator lists are linked.
- Tests: tests/markdownTaskListCheckbox.test.cjs, tests/markdownSanitizerHooks.test.cjs, tests/markdownCustomUrlSchemes.test.cjs.
Commits
- One copy of the autolinks, shared by the app and the markdown package
- Card links never launch a dangerous OS handler
- Autolink references to other tools
- Every hidden HTML comment is made visible
- Link custom URL schemes only when an administrator lists them
- Highlight fenced code blocks with highlight.js
- Task-list checkboxes in the card viewer again
- Render "- [ ] Task" as a real checkbox
- A file:// link no longer makes the card impossible to open
- Always show all code as plain text option
- Fix GFM strikethrough in card descriptions