From fbee5a49ee4c21bf0f31362bf1f9af46adba7a44 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 1 Oct 2020 09:59:52 +0200 Subject: Escape urls in anchors --- .../org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'integration-tests/gradle') diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt index 562a224e..63238907 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt @@ -104,6 +104,14 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac }, "Expected `SampleJavaClass` source link to GitHub" ) + + val anchorsShouldNotHaveHashes = "data-name=\".*#.*\"".toRegex() + assertTrue( + allHtmlFiles().all { file -> + !anchorsShouldNotHaveHashes.containsMatchIn(file.readText()) + }, + "Anchors should not have hashes inside" + ) } private fun File.assertJavadocOutputDir() { -- cgit