This is a talk page for improving CommentMarkup.

Other types

Kale Stutzman? - Coming from a C background (but really this could apply to anyone) I have found the above methods unfamilar, hard to read, as well just too much extra code to type. By adding the following line to config.php and editing it accordingly, any sequence of charactors can be used for comments.

Markup("user-comment", "directives", "/front bracket code(.*?)end bracket code/", "");

Special characters need to have two backslashes - \\ - in front of them, so C-style comments /* comment */ would be coded like this:

Markup("user-comment", "directives", "/\\/\\*(.*?)\\*\\//", "");

HTML comment

You can use the directive described below in case you would like to use markup to create a comment that appears as an HTML comment (i.e. it is embedded in <!-- and --> in the resulting HTML output.

You can create the directive (:HTML-comment:) by adding the following to your local configuration file.

## (:HTML-comment:)
Markup('HTML-comment', 'directives',
	'/\\(:HTML-comment (.*?):\\)/i', '<!-- $1 -->');

Then simply use the directive as follows:

(:HTML-comment This text will become an HTML comment:)

Note: This information was modified from Cookbook:GeneratePDF and has not been tested.

ccox - I use it and depend upon it.. I wrote that little blurb of a recipe. It works. However, I override the (:comment:) directive. It simply makes your wiki comments show up as HTML comments. I did this to allow the htmldoc processor used by the Cookbook:GeneratePDF to use the comments to control the PDF output (e.g. page breaks).


Why doesn't the following work?

(:div class="comment":)
Another form of block comment.

Bla... Another form of block comment.



(:cellnr:)Row one
(:cellnr:)Row two - should be commented out
(:cellnr:)Row three
Row one
Row two - should be commented out
Row three

This is a talk page for improving PmWiki.CommentMarkup.