You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
226 B
17 lines
226 B
1 year ago
|
package kiss
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
|
||
|
"github.com/yuin/goldmark"
|
||
|
)
|
||
|
|
||
|
func RenderPost(post Post) string {
|
||
|
|
||
|
var buf bytes.Buffer
|
||
|
if err := goldmark.Convert(post.Content(), &buf); err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
return buf.String()
|
||
|
}
|