Skip to content
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

Tidy: Remove redundant named anchors #16

Open
jhermann opened this issue Nov 6, 2017 · 0 comments
Open

Tidy: Remove redundant named anchors #16

jhermann opened this issue Nov 6, 2017 · 0 comments

Comments

@jhermann
Copy link
Contributor

jhermann commented Nov 6, 2017

Named or link-less anchors around or in a header (H1…5) can result from copy-pasting HTML into a page. They tend to bleed into the surrounding text when using the "rich" editor of the latest releases (after saving, the new DOM is dirtied with the duplicates). This creates a visual problem, since the default CSS does not discriminate between normal links and named anchors.

Add some code that removes any Anchor nodes with the same name attribute, except the first one. Or put another way, replace any duplicate anchor node with its children, or morph it into a span.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant