Improved performance
This commit is contained in:
@ -3,6 +3,7 @@ package markdown
|
||||
import (
|
||||
"html"
|
||||
"strings"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -40,7 +41,7 @@ func Render(markdown string) string {
|
||||
r.WriteString("</blockquote>")
|
||||
}
|
||||
|
||||
return string(r.out)
|
||||
return unsafe.String(unsafe.SliceData(r.out), len(r.out))
|
||||
}
|
||||
|
||||
if i != len(markdown) && markdown[i] != '\n' {
|
||||
|
Reference in New Issue
Block a user