Skip to content

Commit

Permalink
updatePos can handle tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
emmabastas committed Jul 13, 2021
1 parent f57218e commit 06c17f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions elm-format-lib/src/Text/Parsec/Char.hs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@ updatePos width c (EP.State src pos end indent row col sourceName newline) =

-- The parsec behaviour for tabs is to increment to the nearest
-- 8'th collumn. Shoud we do this as well?
-- Let's not implement this unless it turns out that elm-format
-- needs it.
'\t' -> error "Can't handle tabs"
-- Let's follow the parsec behaviour
'\t' -> (row, (col + 8 - ((col-1) `mod` 8)))

_ -> (row, col + 1)
in
Expand Down

0 comments on commit 06c17f3

Please sign in to comment.