DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:commentsyntax

This is an old revision of the document!


Comment Syntax Plugin

Compatible with DokuWiki

Ponder Stibbons

plugin Comment Syntax for DokuWiki.

Last updated on
2014-09-01
Provides
Syntax
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to comment, commentsrc, wrap

Tagged with !experimental, comment

Installation

Install the plugin through the Extension Manager or Plugin Manager using the download URL above, which points to latest version of the plugin. Refer to plugin installation instructions.

Feature

The Comment Syntax plugin brings a CSS-like comment syntax to your DokuWiki. The comment is not shown in the page, but visible when you edit the page.

Comments are used to explain your Wiki source text, and may help you when you edit it, especially which is using complex syntax markups, at some future. Comments are ignored when converting source text to html.

Examples/Usage

'C' style comments start with /* and ends with */. The comment-start markup /* must be placed at the start of line, or after a white-space letter. Comments can also span multiple lines:

/* This is a comment */
/* This is 
a multi-line
comment */

The comment syntax mode has priority to list block mode. You may comment-out some list item without breaking the whole list structure.

  - item 1 /* A white space is necessary before comment-start markup */
/*- item 2    will be eliminated from this list without breaking it */
  - item 3 /* will be numbered as 2 in the list */ 
  1. item 1
  2. item 3

Note that 'C' style comments end at the first */ encountered. If you however wish that nested comments should be treated correctly, you can change the behavior through the configuration. In case the use_cstyle_nest option is enabled (default off), the whole part enclosed in outmost pair of /* and */ recognized as a comment:

/* There is an another comment /* in this comment */ (nested comment)*/

The “one-line” comment syntax will be available if the use_oneline_style option is enabled (default off).

  * non-ordered list item // comment 
  • non-ordered list item
  - item 1 // A white space is necessary before One-line comment markup
//- item 2    will be eliminated from this list without breaking it
  - item 3 // will be numbered as 2 in the list
  1. item 1
  2. item 3

Configuration and Settings

Config key Description
toolbar_button enable toolbar button toolbar icon (default off)
use_cstyle_nest use nested C-style comments syntax (default off)
use_oneline_style use one-line style comments syntax (default off)

Development

Change Log from github repository

ToDo/Wish List

FAQ

Different syntax patterns of similar plugins

plugin name mode type regular expressions
comment substition special pattern ^/\*.*?\*|\s+/\*.*?\*/
commentsrc substition special pattern !-.*-!
commentsyntax protected entry pattern \s/\*(?=.*?\*/)
exit pattern \*/
substition special pattern \s//(?:[^/\n]*|[^/\n]*/[^/\n]*)(?=\n)

Known Bugs and Issues

Discussion

plugin/commentsyntax.1409477938.txt.gz · Last modified: 2014-08-31 11:38 by s.sahara