Skip to content

Commit

Permalink
highlighter: Ignore regions with empty start or end
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKar committed Apr 15, 2024
1 parent 8724dcc commit 3f08ae8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/highlight/highlighter.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ regionLoop:
if !nestedRegion && curRegion != nil && curRegion != r {
continue
}
if r.start.String() == "" || r.end.String() == "" {
continue
}
startMatches := findAllIndex(r.start, r.skip, line)
endMatches := findAllIndex(r.end, r.skip, line)
samePattern := false
Expand Down

0 comments on commit 3f08ae8

Please sign in to comment.