[doc] Fix dead links checker
This commit is contained in:
parent
0aa781c3ab
commit
bdc08e44fd
@ -24,6 +24,9 @@
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<classpathScope>test</classpathScope>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-rule-docs</id>
|
||||
@ -97,6 +100,11 @@
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
|
@ -276,6 +276,7 @@ public class DeadLinksChecker {
|
||||
while (captionMatcher.find()) {
|
||||
final String anchor = captionMatcher.group(1)
|
||||
.toLowerCase(Locale.ROOT)
|
||||
.replaceAll("'", "") // remove all apostrophes
|
||||
.replaceAll("[^a-z0-9_]+", "-") // replace all non-alphanumeric characters with dashes
|
||||
.replaceAll("^-+|-+$", ""); // trim leading or trailing dashes
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user