Skip to content

Commit

Permalink
Keep empty lines when splitting lines for source code annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
stackotter committed Apr 21, 2024
1 parent dc9e683 commit b1e28a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/GalahInterpreter/Diagnostic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public struct Diagnostic: Error, CustomStringConvertible {
let startLine = startLocation.line - 1
let endLine = endLocation.line - 1

let lines = sourceCode.split(separator: "\n")
let lines = sourceCode.split(separator: "\n", omittingEmptySubsequences: false)
let errorLines = Array(lines[startLine...endLine])
let indent = " "
if errorLines.count > 1 {
Expand Down
Binary file modified static/main.wasm.gz
Binary file not shown.

0 comments on commit b1e28a9

Please sign in to comment.