Table of Contents
Dokuwiki Commonmark Plugin
This is an another plugin that tries to implement Commonmark syntax to Dokuwiki ecosystem. Unlike others, this plugin takes different approach for the goal:
- the plugin will find whether the Markdown doctype indicator (
<!DOCTYPE markdown>) is included in document
- if found, the document will be passed to Commonmark-to-Dokuwiki renderer before main DW parser; all the markups compatible to markdown must be parsed
- after pre-render, the resultant Dokuwiki document will be passed into DW parser; all the remaining process should be processed as usual
This plugin can process all the basic Commonmark syntax, plus footnote / table / strikethrough markup.
Configuration and Settings
Currently, there is no adjustable settings here.
Known Bugs and Issues
For bugs, discussions, and feature requests, please open new here.
- Add toolbar button for Markdown syntax
- Config for footnote style (e.g. refnotes)
Why another Markdown plugin?
There is no Dokuwiki extension that accepts Markdown syntax with complete compatibility. Also, the way Dokuwiki parser works, i.e. token-based process, cannot fit the Markdown syntax (e.g. footnote and nested lists). This plugin is based on the assumption that every Commonmark document can be converted to Dokuwiki markup without any issue, while its reversal is not guaranteed.
There is no way for store DW documents with other extension rather than .txt, due to its core policy. You may modify the local code, it you want to.
Due to the concept that adding pre-render procedure for Commonmark-to-DW conversion, this plugin would have additional computational cost. However, I think Dokuwiki and PHP Commonmark parser is sufficiently fast; it will add a little bit of additional process time.
This plugin aims for complete compatibility of Markdown in Dokuwiki. Most Markdown syntax have corresponding DW syntax, so it will work without problem; but in some cases, Markdown syntax do not matches DW specification one-by-one, or vice versa. Here is a list of known ambiguities between Commonmark and Dokuwiki, and its implements in the plugin:
- Since DW do not parses raw HTML without htmlok config, HTML blocks are passed.