Skip to content

mokelab-go/markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown

Markdown library

Markdown to html

package main

import (
        "fmt"

        markdown "github.com/mokelab-go/markdown/html"
)

const src = `
# Hello markdown

This library outputs html from
markdown.

 * u1
 * u2
 * [u3](https://mokelab.com)
`


func main() {
        m := markdown.NewMarkdown()
        out, err := m.Compile(src)
        if err != nil {
                fmt.Errorf("Error :%s", err)
                return
        }
        fmt.Printf(out)
}