Skip to content

Commit 43929ac

Browse files
committed
fix tabs (issue #1)
1 parent 9010591 commit 43929ac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/parser.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,9 @@ end
295295

296296
const MATPOWER_KEYS :: Vector{String} = ["version", "baseMVA", "areas", "bus", "gencost", "gen", "branch", "storage"];
297297
const NULL_VIEW::SubString{String} = SubString("", 1, 0)
298-
const PRINTABLE_ASCII = 96
299-
const ASCII_OFFSET = 31
298+
const PRINTABLE_ASCII = 256
300299
is_end(c::Char) = isspace(c) || c in "=;[]%"
301-
const ENDS = ntuple(i -> is_end(Char(i + ASCII_OFFSET)), PRINTABLE_ASCII)
300+
const ENDS = ntuple(i -> is_end(Char(i)), PRINTABLE_ASCII)
302301
const KEY_MIN_LEN = 4
303302

304303
struct WordedString
@@ -318,7 +317,7 @@ end
318317
return (NULL_VIEW, 0)
319318
end
320319
right = left
321-
should_end = c -> c > ASCII_OFFSET && ENDS[c - ASCII_OFFSET]
320+
should_end = c -> ENDS[c]
322321
while right <= ws.len && !should_end(Int8(ws.s[right]))
323322
right += 1
324323
end

0 commit comments

Comments
 (0)