diff options
| author | Himanshu Sardana <himanshusardana2005@gmail.com> | 2026-03-16 18:28:53 +0000 |
|---|---|---|
| committer | Himanshu Sardana <himanshusardana2005@gmail.com> | 2026-03-16 18:28:53 +0000 |
| commit | 86f46ef995ca47a33590366b41dc299619bf81f0 (patch) | |
| tree | d44f04db639864472ed3f7513edc82d9c01cc176 /main.go | |
| parent | e39483c49db06b6157968bfaaa66180517d022f3 (diff) | |
feat: add basic markdown parsing
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) } |
