Fix EPICS::PodXHtml and generate section links
Some checks failed
Base / Ub-22 clang C++11 (push) Has been cancelled
Base / Ub-22 clang (push) Has been cancelled
Base / Ub-22 gcc + RT-4.9 (push) Has been cancelled
Base / MacOS clang (push) Has been cancelled
Base / Ub-24 gcc-13 c++20 Werror (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-22 gcc + RT-4.10 (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-22 gcc unsigned char (push) Has been cancelled
Base / Ub-22 gcc + MinGW, static (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-22 gcc + MinGW (push) Has been cancelled
Base / Ub-22 gcc C++11, static (push) Has been cancelled
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-8 (push) Failing after 2s
Base / Fedora-33 (push) Failing after 5s
Base / Fedora-latest (push) Failing after 4s
Base / Rocky-9 (push) Failing after 5s
CodeQL / Analyze (cpp) (push) Failing after 1s
Base / Docker CentOS-7 (push) Failing after 14s
Some checks failed
Base / Ub-22 clang C++11 (push) Has been cancelled
Base / Ub-22 clang (push) Has been cancelled
Base / Ub-22 gcc + RT-4.9 (push) Has been cancelled
Base / MacOS clang (push) Has been cancelled
Base / Ub-24 gcc-13 c++20 Werror (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-22 gcc + RT-4.10 (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-22 gcc unsigned char (push) Has been cancelled
Base / Ub-22 gcc + MinGW, static (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
Base / Ub-22 gcc + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-22 gcc + MinGW (push) Has been cancelled
Base / Ub-22 gcc C++11, static (push) Has been cancelled
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-8 (push) Failing after 2s
Base / Fedora-33 (push) Failing after 5s
Base / Fedora-latest (push) Failing after 4s
Base / Rocky-9 (push) Failing after 5s
CodeQL / Analyze (cpp) (push) Failing after 1s
Base / Docker CentOS-7 (push) Failing after 14s
Overrides an internal method in Pod::Simple::XHTML that appends a section sign which links to this section.
This commit is contained in:
@ -7,8 +7,8 @@ use base 'Pod::Simple::XHTML';
|
|||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
if ($Pod::Simple::XHTML::VERSION < '3.16') {
|
if ($Pod::Simple::XHTML::VERSION < '3.16') {
|
||||||
# encode_entities() wasn't a method, add it
|
# Add encode_entities() as a method
|
||||||
our *encode_entities = sub {
|
sub encode_entities {
|
||||||
my ($self, $str) = @_;
|
my ($self, $str) = @_;
|
||||||
my %entities = (
|
my %entities = (
|
||||||
q{>} => 'gt',
|
q{>} => 'gt',
|
||||||
@ -37,4 +37,23 @@ sub resolve_pod_page_link {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub _end_head {
|
||||||
|
my $h = delete $_[0]{in_head};
|
||||||
|
|
||||||
|
my $add = $_[0]->html_h_level;
|
||||||
|
$add = 1 unless defined $add;
|
||||||
|
$h += $add - 1;
|
||||||
|
|
||||||
|
my $id = $_[0]->idify($_[0]{htext});
|
||||||
|
my $text = $_[0]{scratch};
|
||||||
|
my $hid = qq{<h$h id="$id">};
|
||||||
|
my $link = qq{ <a class='sect' href="#$id">§</a>};
|
||||||
|
$_[0]{'scratch'} = $_[0]->backlink && ($h - $add == 0)
|
||||||
|
# backlinks enabled && =head1
|
||||||
|
? qq{$hid<a href="#_podtop_">$text</a> $link</h$h>}
|
||||||
|
: qq{$hid$text $link</h$h>};
|
||||||
|
$_[0]->emit;
|
||||||
|
push @{ $_[0]{'to_index'} }, [$h, $id, delete $_[0]{'htext'}];
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -69,6 +69,11 @@ A[href="#POD_ERRORS"] {
|
|||||||
color: #FF0000;
|
color: #FF0000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
A.sect {
|
||||||
|
color: #99ccff;
|
||||||
|
vertical-align: super;
|
||||||
|
}
|
||||||
|
|
||||||
TD {
|
TD {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
Reference in New Issue
Block a user