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 {...} >>