this patch seems to work ```diff --git a/plugins/c...
# refreshversions
n
this patch seems to work
Copy code
diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/SettingsPluginsUpdater.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/SettingsPluginsUpdater.kt
index 281e4896..2b3a7e4d 100644
--- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/SettingsPluginsUpdater.kt
+++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/SettingsPluginsUpdater.kt
@@ -152,14 +164,18 @@ internal object SettingsPluginsUpdater {

     /** Removes comments previously added by refreshVersions. */
     internal fun StringBuilder.removeCommentsAddedByUs() {
-        val startOfRefreshVersionsCommentLines = "\n////"
+        val newline = System.lineSeparator()
+        val startOfRefreshVersionsCommentLines = "$newline////"
         var startIndex = 0
         while (true) {
             val indexOfComment = indexOf(startOfRefreshVersionsCommentLines, startIndex = startIndex)
             if (indexOfComment == -1) return
             startIndex = indexOfComment
             val indexOfEndOfLine = indexOf(
-                "\n",
+                '\r',
+                startIndex = indexOfComment + startOfRefreshVersionsCommentLines.length
+            ).takeIf { it >= 0 } ?: indexOf(
+                '\n',
                 startIndex = indexOfComment + startOfRefreshVersionsCommentLines.length
             ).takeIf { it >= 0 }
             val endIndex = indexOfEndOfLine ?: length