markdown

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

README

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)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Markdown

type Markdown interface {
	// Compile markdown to other language
	Compile(src string) (string, error)
}

Markdown provides API to convert markdown to other language

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL