Use bytes.IndexByte to skip til EOL

This commit is contained in:
Vytautas Šaltenis 2016-09-10 15:24:45 +03:00
parent 993325d13f
commit d9ffdb7464
1 changed files with 1 additions and 4 deletions

View File

@ -1485,10 +1485,7 @@ func (p *parser) paragraph(data []byte) int {
}
// otherwise, scan to the beginning of the next line
for data[i] != '\n' {
i++
}
i++
i += bytes.IndexByte(data[i:], '\n') + 1
}
p.renderParagraph(data[:i])