Include markdown sample

Fix UI refresh problem
Enable invocation from portal
This commit is contained in:
Alex Ellis
2017-01-31 09:08:58 +00:00
parent c211ba0d07
commit 4e73f787da
11 changed files with 152 additions and 7 deletions

View File

@ -0,0 +1,17 @@
package main
import (
"fmt"
"io/ioutil"
"os"
"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday"
)
func main() {
input, _ := ioutil.ReadAll(os.Stdin)
unsafe := blackfriday.MarkdownCommon([]byte(input))
html := bluemonday.UGCPolicy().SanitizeBytes(unsafe)
fmt.Println(string(html))
}