[pmwiki-users] A (:comment:) markup enhancement

Dominique Faure dominique.faure.1 at free.fr
Tue Mar 15 17:11:45 CST 2005


Hi,

When developing code in [choose a programming language here], I'm used to
enable/disable prog parts with comments marks.
With PmWiki, I've got the (:comment ...:) directive, but its current
definition isn't supporting embedding of other directives into comments:

(:comment foo bar ...:) => (nothing) regular use works as expected
(:comment (:nl:) :)     => <space>:) aka. closing mark of (:nl:) is closing
the comment directive

So, the current markup definition:

Markup('comment','directives','/\\(:comment .*?:\\)/','');

could be changed into:

Markup('comment','<directives','/\\(:comment\\s?.*:\\)/','');

or even into:

Markup('comment','<directives','/\\(:comment\\s?.*:\\)/s','');

to handle multiline comments embedding disabled directives, with the
performance cost impact of having greedy regexp.

Regards,
Dominique




More information about the pmwiki-users mailing list