Skip to content

id of Anchor is wrong #4

@yuki-kimoto

Description

@yuki-kimoto

From metacpan/metacpan-web#2668

Grinnz said "This can be discussed in https://metacpan.org/dist/MetaCPAN-Pod-XHTML if necessary, as this behavior is controlled by those roles."

I post this issue.

The id of anchor is wrong when there are multiple head names that start with the same string.

=head1 Method Names

Method Names.

=head1 Method

Method.

=head2 Method Definition

Method Definition.

L<"Method">

L<"Method"> want to jump to "=head1 Method", but it jumps to "=head1 Method Names".

Pod Renderer renders the following HTML.

<h1 id="Method-Names"><a href="#Method-Names" class="anchor"><span class="fa fa-bookmark black"></span></a><a id="Method"></a>Method Names</h1>

<p>Method Names.</p>

<h1 id="Method1"><a href="#Method1" class="anchor"><span class="fa fa-bookmark black"></span></a>Method</h1>

<p>Method.</p>

<h2 id="Method-Definition"><a href="#Method-Definition" class="anchor"><span class="fa fa-bookmark black"></span></a><a id="Method2"></a>Method Definition</h2>

<p>Method Definition.</p>

<p><a href="#Method">"Method"</a></p></div>

Is this behavior changed?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions