Skip to content

Commit ec9e24c

Browse files
Enable fail on warnings, set custom output directory for Dokka HTML, and refine prefix function documentation format.
1 parent 1a421ee commit ec9e24c

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ kotlin {
8989
}
9090

9191
dokka {
92+
dokkaPublications.html {
93+
failOnWarning.set(true)
94+
outputDirectory.set(rootDir.resolve("docs"))
95+
}
96+
9297
dokkaSourceSets.named("commonMain") {
9398
samples.from("src/commonTest/kotlin/samples")
9499
sourceLink {

src/commonMain/kotlin/kodvent/strings/PrefixFunction.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package kodvent.strings
1010
/**
1111
* Computes the prefix function for this character sequence.
1212
*
13-
* The prefix function π[i] is defined as the length of the longest proper prefix
13+
* The prefix function π_i is defined as the length of the longest proper prefix
1414
* of the substring `s[0..i]` that is also a suffix of this substring.
1515
* This is a fundamental component of the
1616
* [Knuth-Morris-Pratt (KMP) string matching algorithm](https://cp-algorithms.com/string/prefix-function.html).
@@ -33,7 +33,7 @@ public fun CharSequence.prefixFunction(): IntArray = prefixFunction(length, ::ge
3333
* Computes the prefix function for a generic sequence.
3434
*
3535
* This is a generalized version of the prefix function that works with any type of sequence
36-
* where elements can be accessed by index and compared for equality. The prefix function π[i]
36+
* where elements can be accessed by index and compared for equality. The prefix function π_i
3737
* represents the length of the longest proper prefix that is also a suffix for the sequence up to position i.
3838
*
3939
* ## Complexity

0 commit comments

Comments
 (0)