1 # Copyright (C) 2008 Weakish Jiang <weakish@gmail.com>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License version 2 as
5 # published by the Free Software Foundation.
7 # You can get a copy of GPL version 2 at
8 # http://www.gnu.org/licenses/gpl-2.0.html
11 # http://www.oddmuse.org/cgi-bin/oddmuse/Html_Comment_Extension
13 $ModulesDescription .= '<p><a href="http://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/htmlcomment.pl">htmlcomment.pl</a>, see <a href="http://www.oddmuse.org/cgi-bin/oddmuse/Html_Comment_Extension">Html Comment Extension</a></p>';
15 push(@MyRules, \
&HtmlCommentRules
);
17 sub HtmlCommentRules
{
21 # This RegExp is borrowed from creole.pl shamelessly.
22 if ($bol && m/\G\/\
*[ \t]*\n(.*?
\n)\
*\
/[ \t]*(\n|\z)/cgs) {
24 $str =~ s/\n \*\//\n\
*\
//g;
25 return CloseHtmlEnvironments
() . '<!--' . $str . '-->'
26 . AddHtmlEnvironment
('p');