Subject: | Doxygen::Filter::Perl - keep indentation |
Date: | Mon, 27 May 2013 17:39:59 +0000 |
To: | "bug-Doxygen-Filter-Perl [...] rt.cpan.org" <bug-Doxygen-Filter-Perl [...] rt.cpan.org> |
From: | Sebastian Rose <Sebastian.Rose [...] mentana.de> |
Hello there,
The perl Doxygen filter eats up leading whitespace and therefor destroys the
indentation of code examples.
Here's a fix for that.
In line 841 of Doxygen::Filter::Perl:
# Lets remove all of the Perl comment markers so long as we are not
in a verbatim block
if ($iInVerbatimBlock == 0) { $line =~ s/^\s*#\s?//; }
### Note the `?' after the second \s
This keeps code blocks indentations.
Example:
#** @method Query ( $db_name, $query, $error, @parameters )
#
# Bla bla bla.
#
# \b Beispiel:
# \code
# my $hash_ref = Db::Query(
# 'demail', # Name der Datenbank
# $sql, # SQL mit `?' f. die Parameter
# $fehlertext, # Für's Logging
# $param1,... # Parameter f. die `?' im SQL.
# );
#
# if ( $hash_ref && defined( $hash_ref->{name} ) )
# {
# print $hash_ref->{name}, "\n";
# }
# \endcode
Best regards,
Sebastian Rose
Message body not shown because it is not plain text.