use IndexByte instead of IndexRune everywhere because it's faster.

This commit is contained in:
fiatjaf
2025-05-05 23:37:43 -03:00
parent 3723924561
commit 0ae2316523
4 changed files with 9 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ func Parse(content string) iter.Seq[Block] {
prevIndex := 0
for index < max {
pu := strings.IndexRune(content[index:], ':')
pu := strings.IndexByte(content[index:], ':')
if pu == -1 {
// reached end
break