Use <a id> rather than <a name> for the FAQ anchors - #842
Merged
Conversation
Follow-up to the FML to Markdown conversion. maven-site-plugin 3.21.0 strips the name= attribute from an inline HTML anchor; 3.22.0 keeps it. On 3.21.0 every anchor on the page is therefore lost silently, on a green build. This repo builds with a parent that pulls 3.22.0, so the pages are correct today, but <a id> is the form that survives either way - and Xhtml5BaseParser reads Attribute.ID first, falling back to NAME only if it is absent, so id= is the primary path. name= on <a> is obsolete in HTML5 besides. Each anchor stays on its own line; folding one into the heading text suppresses the section's own generated id. Verified by rendering faq.html before and after: the anchor set is unchanged and still a superset of what the original FML page served, the <head> is byte-identical, the visible text matches the FML original word for word, and the site log reports no "used more than once" warning. Generated-by: Claude Opus 5 (1M context)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the FML → Markdown FAQ conversion, which is already merged here.
<a id>instead of<a name>maven-site-plugin 3.21.0 strips the
name=attribute from an inline HTML anchor; 3.22.0keeps it. On 3.21.0 every anchor on the page is lost silently, on a green build with
mvn siteexiting 0. This repo builds with a parent that pulls 3.22.0, so the page iscorrect as it stands — but
<a id>is the form that survives either way, and it is theright one regardless:
Xhtml5BaseParserreadsAttribute.IDfirst and only falls back toNAME, soid=isthe primary path.
name=on<a>is obsolete in HTML5.Anchors stay on their own line; folding one into the heading text suppresses the section's
own generated id.
Verification
Rendered
faq.htmlbefore and after this change:page served, so no deep link changes;
<head>is byte-identical;used more than onceanchor warning.target/sitewas deleted before each build and the page confirmed regenerated, so this isnot a stale-output pass.
Drafted with Claude — please verify