We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78f085c commit 43e084cCopy full SHA for 43e084c
1 file changed
Core/Sources/SuggestionWidget/SyntaxHighlighting.swift
@@ -103,13 +103,13 @@ func convertToCodeLines(
103
// remove leading spaces
104
if commonLeadingSpaceCount > 0 {
105
let leadingSpaces = String(repeating: " ", count: commonLeadingSpaceCount)
106
- if isEmptyLine(mutable.string) {
107
- mutable.mutableString.setString("")
108
- } else if mutable.string.hasPrefix(leadingSpaces) {
+ if mutable.string.hasPrefix(leadingSpaces) {
109
mutable.replaceCharacters(
110
in: NSRange(location: 0, length: commonLeadingSpaceCount),
111
with: ""
112
)
+ } else if isEmptyLine(mutable.string) {
+ mutable.mutableString.setString("")
113
}
114
115
0 commit comments