diff --git a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/StringCasing.kt b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/StringCasing.kt index 5a357d4d..49d85117 100644 --- a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/StringCasing.kt +++ b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/StringCasing.kt @@ -32,11 +32,12 @@ internal fun String.isKebabCase(): Boolean { else -> { var prevIsHyphen = false for (c in this) { - if (c.isSeparatorOrWordStart()) { - return false - } val isHyphen = c == '-' - if (isHyphen && prevIsHyphen) { + if (isHyphen) { + if (prevIsHyphen) { + return false + } + } else if (c.isSeparatorOrWordStart()) { return false } prevIsHyphen = isHyphen