From 86f46ef995ca47a33590366b41dc299619bf81f0 Mon Sep 17 00:00:00 2001 From: Himanshu Sardana Date: Mon, 16 Mar 2026 18:28:53 +0000 Subject: feat: add basic markdown parsing --- main.go | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 02a1288..6cf7c19 100644 --- a/main.go +++ b/main.go @@ -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) } -- cgit v1.3.1