summaryrefslogtreecommitdiff
path: root/main.go
blob: 6cf7c1957b6c66d4db6b2f8baa33083b7691b264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main

import (
	"fmt"
	"os"
	"path/filepath"

	"github.com/gomarkdown/markdown"
	// "github.com/gomarkdown/markdown/html"
	// "github.com/gomarkdown/markdown/parser"
)

func main() {
	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)
}