1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 02:27:20 +00:00
charles
2024-06-30 07:23:47 +08:00
committed by GitHub
parent 91745ae46f
commit f0033051d5
6 changed files with 79 additions and 6 deletions

View File

@ -53,6 +53,12 @@ func (b *blockParser) Open(parent ast.Node, reader text.Reader, pc parser.Contex
}
idx := bytes.Index(line[pos+2:], endBytes)
if idx >= 0 {
// for case $$ ... $$ any other text
for i := pos + idx + 4; i < len(line); i++ {
if line[i] != ' ' && line[i] != '\n' {
return nil, parser.NoChildren
}
}
segment.Stop = segment.Start + idx + 2
reader.Advance(segment.Len() - 1)
segment.Start += 2