DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:commentsyntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
plugin:commentsyntax [2014-09-01 14:36] – [Configuration and Settings] s.saharaplugin:commentsyntax [2019-11-28 14:29] – similar to the wrap plugin Aleksandr
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: Comment Syntax for DokuWiki+description: Allow to use source comment syntax to leave edit instructions of the page. Comments are visible only in the source view, not rendered as any page elements
-author     : S.Sahara +author     : Satoshi Sahara
 email      : sahara.satoshi@gmail.com  email      : sahara.satoshi@gmail.com 
 type       : syntax type       : syntax
-lastupdate : 2014-09-01 +lastupdate : 2019-11-28 
-compatible : Ponder Stibbons+compatible : Ponder Stibbons, Hrun, Detritus, Elenor Of Tsort, Frusterick Manners, Greebo+
 depends    :  depends    : 
 conflicts  conflicts 
-similar    : comment, commentsrc +similar    : comment, commentsrc, wrap 
-tags       : !experimental, comment+tags       : comment
  
 downloadurl: https://github.com/ssahara/dw-plugin-commentsyntax/zipball/master downloadurl: https://github.com/ssahara/dw-plugin-commentsyntax/zipball/master
Line 24: Line 24:
 ===== Installation ===== ===== Installation =====
  
-Install the plugin through the [[plugin:extension|Extension Manager]] or [[plugin:plugin|Plugin Manager]] using the download URL above, which points to latest version of the plugin. Refer to [[:plugin_installation_instructions|plugin installation instructions]].+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== Feature ===== ===== Feature =====
Line 34: Line 34:
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
 +==== 1. 'C' style comments ====
 '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: '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:
  
Line 55: Line 56:
   /* There is an another comment /* in this comment */ (nested comment)*/   /* There is an another comment /* in this comment */ (nested comment)*/
  
 +==== 2. one-line comment ====
 The "one-line" comment syntax will be available if the ''use_oneline_style'' option is enabled (default off). The "one-line" comment syntax will be available if the ''use_oneline_style'' option is enabled (default off).
 <file> <file>
Line 70: Line 71:
   - item 1   - item 1
   - item 3    - item 3 
 +
 +:!: **Adverse effect:** The one-line comment syntax ''%%//%%'' may interfere with the markup for //italics//. The use of //italic// formatting markup ''%%//...//%%'' will be restricted so that it can not go over next line.  
 +<file>
 +This text //in italics. 
 +is rendered as normal // due to broken double-slash pairs
 +</file>
 +
 +This text is rendered as normal
 +
 +==== 3. Control Macro like Comments ====
 +There are so-called [[wiki:syntax#control_macros|control macros]] syntax, such as ''%%~~NOCACHE~~%%''. It may be convenient if you put a white space between ''%%~~%%'' and ''%%NOCACHE~~%%'', it becomes a comment without displaying ''~~ NOCACHE~~'' in the page.
 +
 +  ~~ This is a comment without affecting other macros in the page. ~~ 
 +
 +
  
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
Line 90: Line 106:
 |[[plugin:comment]]         | substition |special pattern |''%%^/\*.*?\*|\s+/\*.*?\*/%%'' | |[[plugin:comment]]         | substition |special pattern |''%%^/\*.*?\*|\s+/\*.*?\*/%%'' |
 |[[plugin:commentsrc]]      | substition |special pattern |''%%!-.*-!%%''  | |[[plugin:commentsrc]]      | substition |special pattern |''%%!-.*-!%%''  |
-|commentsyntax   | protected   |entry pattern   |''%%\s/\*(?=.*?\*/)%%''  |+|commentsyntax   | protected   |entry pattern   |''%%\t]*\n?/\*(?=.*?\*/)%%''  |
 | :::            | :::         |exit pattern    |''%%\*/%%''              | | :::            | :::         |exit pattern    |''%%\*/%%''              |
 | :::            | substition  |special pattern |''%%\s//(?:[^/\n]*|[^/\n]*/[^/\n]*)(?=\n)%%''  | | :::            | substition  |special pattern |''%%\s//(?:[^/\n]*|[^/\n]*/[^/\n]*)(?=\n)%%''  |
 +| :::            | substition  |special pattern |''%%~~[^\r\n]+?~~%%''  |
  
  
Line 101: Line 118:
 ===== Discussion ===== ===== Discussion =====
  
 +Is there plans to fix the current issues?
  
- +> Which issues? There are none listed here nor in the bug tracker. --- [[user>ach|Anika Henke]] //2016-07-31 15:42//
plugin/commentsyntax.txt · Last modified: 2022-01-01 02:08 by s-sahara

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki