Skip to content

Commit

Permalink
Don't chain invalid node
Browse files Browse the repository at this point in the history
  • Loading branch information
pelletier committed Mar 29, 2023
1 parent 5274f6f commit ad9ccbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unstable/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ func (p *Parser) parseExpression(b []byte) (reference, []byte, error) {

if len(b) > 0 && b[0] == '#' {
cref, rest, err := p.parseComment(b)
p.builder.Chain(ref, cref)
if cref != invalidReference {
p.builder.Chain(ref, cref)
}
return ref, rest, err
}

Expand Down

0 comments on commit ad9ccbe

Please sign in to comment.