Skip to content

Commit

Permalink
Also treat '\t' as whitespace character
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyonlin committed Oct 20, 2020
1 parent 3f4e137 commit e4a3e5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dedent/dedent.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func minIndent(s string) int {
)
for i := 0; i < len(s); i++ {
switch s[i] {
case ' ':
case ' ', '\t':
if shouldAppend {
curIndent++
}
Expand Down Expand Up @@ -51,7 +51,7 @@ func dedent(s string, indent int) string {

for i := 0; i < len(s); i++ {
switch s[i] {
case ' ':
case ' ', '\t':
if shouldOmit {
if omitted < indent {
omitted++
Expand Down

0 comments on commit e4a3e5a

Please sign in to comment.