Skip to content

Commit

Permalink
fix(parser): variable name typo
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaLohinski authored May 12, 2024
1 parent 8f46b62 commit 4e090df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

var (
lineReturnWithOnlyWitheSpace = regexp.MustCompile("^(\n|\r)[ \t]*$")
lineReturnWithOnlyWhiteSpace = regexp.MustCompile("^(\n|\r)[ \t]*$")
)

type ControlStructureGetter interface {
Expand Down Expand Up @@ -228,7 +228,7 @@ func (p *Parser) parseDocElement() (nodes.Node, error) {
return node, err
}
if p.Config.TrimBlocks && !p.End() && p.Peek(tokens.BlockBegin) != nil {
if data := p.Current(tokens.Data); data != nil && lineReturnWithOnlyWitheSpace.MatchString(data.Val) {
if data := p.Current(tokens.Data); data != nil && lineReturnWithOnlyWhiteSpace.MatchString(data.Val) {
p.Consume() // Consume whitespace
}
}
Expand Down

0 comments on commit 4e090df

Please sign in to comment.