Skip to content

Commit

Permalink
Update Sources/SwiftFormat/PrettyPrint/PrettyPrintBuffer.swift
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Hoppen <[email protected]>
  • Loading branch information
macshome and ahoppen authored Dec 19, 2024
1 parent 87467ee commit bb5b4c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/PrettyPrint/PrettyPrintBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct PrettyPrintBuffer {
var lastLength = 0
// We are only interested in "\n" we can use the UTF8 view and skip the grapheme clustering.
for element in text.utf8 {
if element == 10 {
if element == UInt8(ascii: "\n") {
lineNumber += 1
lastLength = 0
} else {
Expand Down

0 comments on commit bb5b4c9

Please sign in to comment.