aim42 / htmlSanityCheck

Standalone (batch- and command-line) and Gradle-plugin html sanity checker - detects missing images, dead links and cross-references, duplicate link targets (anchors) and the like.
Apache License 2.0
68 stars 42 forks source link

False positives: named anchors in same file #268

Open matthiaskraaz opened 5 years ago

matthiaskraaz commented 5 years ago

This document:

<html><body>
<a href="#Anchorname">linked text</a>
<a name="Anchorname">a named anchor</a>
</body>
</html>

gives a false positive:

link target "Anchorname" missing

build.gradle:

plugins {
  id 'org.aim42.htmlSanityCheck' version '1.1.0'
}
htmlSanityCheck {
    sourceDir = new File( "$projectDir/test" )
}
ascheman commented 7 months ago

We should at first provide a regression test.