-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
id of Anchor is wrong #4
Comments
This is definitely wrong, but fixing it is not easy. The ids are generated as the Pod is parsed. Extra targets are generated for the first word of the heading, as it's very common for people to include things like parameter specifications in headings but try to link with just the function or method name. Since they are generated as the Pod is parsed, the abbreviated ids can conflict with future headings that consist of only the first word of a previous heading. To avoid this, the additional ids would need to be generated after parsing the entire document and inserted. |
I understand now the following heading create additional "foo" id .
I will read the source codes of MetaCPAN-Pod-XHTML. Could I try to fix this? The fixing is "If there is an exact matching heading, the correct id is given to the heading"
What could be the problem with the fix? |
The problem is that given the pod:
By the time the parser sees You are certainly welcome to try to fix this. |
Thank you to allow me to trying fix this. I will try to fix this in few weeks. |
I try to fix this from today. |
I'm reading source codes. I want to get original POD that is passed to "parse_string_document" to get heading information. https://github.com/metacpan/MetaCPAN-Pod-XHTML/blob/master/t/accurate-targets.t#L33 but Pod::Simple doesn't save original POD. https://metacpan.org/module/Pod::Simple/source#L418 I want to hook "parse_string_document" to get heading information. How do you think this? |
I made an initial implementation of this in #5, but I'm going to hold off on releasing it for now. I've worked on getting some fixes and refactoring merged into Pod::Simple itself. Once there is a new release of that, I'll be updating this dist to work with it, and then merging in something like I have in the PR I prepared for this issue. |
Thank you very much! I wait for the merge. |
This should be fixed in 0.003000. |
Thank you very much! |
This bug does not appear to be fixed in metaCPAN or Pod Renderer. |
We may need to update the dep in |
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.
L<"Method"> want to jump to "=head1 Method", but it jumps to "=head1 Method Names".
Pod Renderer renders the following HTML.
Is this behavior changed?
The text was updated successfully, but these errors were encountered: