blob: 3a2d33c5bc201885ef065cd7274e1698882ff25b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package main
import (
"github.com/russross/blackfriday/v2"
"io/ioutil"
)
// Takes the path to a markdown file and outputs the processed HTML in a string
func processMarkdown(path string) (md string, err error) {
data, err := ioutil.ReadFile(path)
if err != nil {
return
}
md = string(blackfriday.Run(data))
return
}
|