diff --git a/pmd-doc/pom.xml b/pmd-doc/pom.xml index 76fd0f7817..55529bfed2 100644 --- a/pmd-doc/pom.xml +++ b/pmd-doc/pom.xml @@ -24,6 +24,9 @@ org.codehaus.mojo exec-maven-plugin + + test + generate-rule-docs @@ -97,6 +100,11 @@ snakeyaml + + org.slf4j + slf4j-simple + test + org.junit.jupiter junit-jupiter diff --git a/pmd-doc/src/main/java/net/sourceforge/pmd/docs/DeadLinksChecker.java b/pmd-doc/src/main/java/net/sourceforge/pmd/docs/DeadLinksChecker.java index 9f8fbe170f..9e3b11c5c2 100644 --- a/pmd-doc/src/main/java/net/sourceforge/pmd/docs/DeadLinksChecker.java +++ b/pmd-doc/src/main/java/net/sourceforge/pmd/docs/DeadLinksChecker.java @@ -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