blob: 0f26b2f5b93bc396ff2c09d83e37005859fb0e82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package transformers
import org.jetbrains.dokka.model.SourceSetDependent
import org.jetbrains.dokka.model.doc.DocumentationNode
import org.jetbrains.dokka.model.doc.Text
import org.jetbrains.dokka.model.withDescendants
import org.junit.jupiter.api.io.TempDir
import java.nio.file.Path
abstract class AbstractContextModuleAndPackageDocumentationReaderTest {
@TempDir
protected lateinit var temporaryDirectory: Path
companion object {
val SourceSetDependent<DocumentationNode>.texts: List<String>
get() = values.flatMap { it.withDescendants() }
.flatMap { it.children }
.flatMap { it.children }
.mapNotNull { it as? Text }
.map { it.body }
}
}
|