Skip Menu |

This queue is for tickets about the Perl6-Perldoc CPAN distribution.

Report information
The Basics
Id: 81977
Status: open
Priority: 0/
Queue: Perl6-Perldoc

People
Owner: Nobody in particular
Requestors: LCONS [...] cpan.org
Cc:
AdminCc:

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



Subject: The prefix used to introduce notes should be configurable
The attached patch adds an option for this.
Subject: patch.txt
--- ./Perl6/Perldoc/To/Xhtml.pm- 2012-12-11 09:50:15.000000000 +0100 +++ ./Perl6/Perldoc/To/Xhtml.pm 2012-12-14 10:38:22.000000000 +0100 @@ -75,7 +75,8 @@ my $xhtml_rep = $self->{tree}->to_xhtml($opt_ref); if ($opt_ref->{notes}) { - $xhtml_rep .= "<h1>Notes</h1>\n$opt_ref->{notes}"; + $xhtml_rep .= $opt_ref->{notes_prefix} || "<h1>Notes</h1>\n"; + $xhtml_rep .= $opt_ref->{notes}; } if (exists $opt_ref->{full_doc}) { @@ -855,6 +856,13 @@ </html> END_XHTML +=item C<< notes_prefix => HTML >> + +Annotations are appended at the end of the document, prefixed by default +with C<< <h1>Notes</h1>\n >>. This option allows to change this prefix to +something else, for instance: + + $perldoc->to_xhtml({ notes_prefix => "<hr>" }); =item C<< text_to_entities => sub {...} >>
Subject: Re: [rt.cpan.org #81977] The prefix used to introduce notes should be configurable
Date: Sat, 15 Dec 2012 08:43:35 +1100
To: bug-Perl6-Perldoc [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Patch applied! Thanks again. Damian