Skip Menu |

This queue is for tickets about the Doxygen-Filter-Perl CPAN distribution.

Report information
The Basics
Id: 85651
Status: resolved
Priority: 0/
Queue: Doxygen-Filter-Perl

People
Owner: JORDAN [...] cpan.org
Requestors: Sebastian.Rose [...] mentana.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Download smime.p7s
application/pkcs7-signature 4.8k

Message body not shown because it is not plain text.

Thanks for the patch. I have applied this to the 1.70 version that I will release today. On Mon May 27 13:40:29 2013, Sebastian.Rose@mentana.de wrote: Show quoted text
> 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