Fixed string position for escaped sequences. Fixes #886

This commit is contained in:
Oliver 2023-09-16 11:21:02 +02:00
parent a39fe28ba4
commit 8a0aeb0aa3
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ func step(str string, state *stepState, opts stepOptions) (cluster, rest string,
} else if cluster[0] == '[' { // Starting closing sequence. } else if cluster[0] == '[' { // Starting closing sequence.
// Swallow the first one. // Swallow the first one.
cluster, rest, state.boundaries, state.unisegState = uniseg.StepString(rest, preState) cluster, rest, state.boundaries, state.unisegState = uniseg.StepString(rest, preState)
state.grossLength = len(cluster) state.grossLength += len(cluster)
if cluster[0] == ']' { if cluster[0] == ']' {
state.escapedTagState = etNone state.escapedTagState = etNone
} else { } else {