Skip to content

Commit

Permalink
Avoid awful warning
Browse files Browse the repository at this point in the history
  • Loading branch information
peachpit-site committed Feb 1, 2025
1 parent b7f40d8 commit 3c5a051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/lexer/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ func (l *Lexer) readSnippet() string {
return result
}
}
if strings.HasPrefix(stackTop, currentWhitespace) || currentWhitespace == "\n" || currentWhitespace == "\r" || currentWhitespace == string(0) { // Then we've unindented. Dobby is free!
if currentWhitespace != "\n" && currentWhitespace != "\r" && currentWhitespace == string(0) {
if strings.HasPrefix(stackTop, currentWhitespace) || currentWhitespace == "\n" || currentWhitespace == "\r" || currentWhitespace == string(rune(0)) { // Then we've unindented. Dobby is free!
if currentWhitespace != "\n" && currentWhitespace != "\r" && currentWhitespace == string(rune(0)) {
l.snippetWhitespace = currentWhitespace
}
return result
Expand Down

0 comments on commit 3c5a051

Please sign in to comment.