diff --git a/scanner/scanner.go b/scanner/scanner.go index 13d2fff..fb068ed 100644 --- a/scanner/scanner.go +++ b/scanner/scanner.go @@ -250,7 +250,17 @@ func (s *Scanner) scanSingleQuote(ctx *Context) (*token.Token, error) { } } continue - } else if isFirstLineChar && (c == ' ' || c == '\t') { + } else if isFirstLineChar && c == ' ' { + continue + } else if isFirstLineChar && c == '\t' { + if s.lastDelimColumn >= s.column { + return nil, ErrInvalidToken( + token.Invalid( + "tab character cannot be used for indentation in single-quoted text", + string(ctx.obuf), s.pos(), + ), + ) + } continue } else if c != '\'' { value = append(value, c)