Make .RenderString render shortcodes

Fixes #6703
This commit is contained in:
Bjørn Erik Pedersen
2022-05-29 16:41:57 +02:00
parent d2cfaede5b
commit 9e904d756b
10 changed files with 315 additions and 111 deletions

View File

@@ -64,11 +64,12 @@ func Puts(s string) string {
// VisitLinesAfter calls the given function for each line, including newlines, in the given string.
func VisitLinesAfter(s string, fn func(line string)) {
high := strings.Index(s, "\n")
high := strings.IndexRune(s, '\n')
for high != -1 {
fn(s[:high+1])
s = s[high+1:]
high = strings.Index(s, "\n")
high = strings.IndexRune(s, '\n')
}
if s != "" {