diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -1,7 +1,23 @@ package main -import "fmt" +import ( + "fmt" + "os" + "path/filepath" + + "github.com/gomarkdown/markdown" + // "github.com/gomarkdown/markdown/html" + // "github.com/gomarkdown/markdown/parser" +) func main() { - fmt.Println("testing") + path := filepath.Join("./test.md") + mds, err := os.ReadFile(path) + if err != nil { + fmt.Println("Error %s", err) + } + md := []byte(mds) + html := markdown.ToHTML(md, nil, nil) + + fmt.Printf("--- Markdown:\n%s\n\n--- HTML:\n%s\n", md, html) } |
