markdown

package module
v0.0.0-...-2e4c62f Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 10 Imported by: 0

README

markdown-parser

LICENSE

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToHTML

func ConvertToHTML(s string) string

Types

type Mark

type Mark struct {
	Meta    Meta
	Raw     []byte
	Content string
	Brief   string
	File    string
}

func Parse

func Parse(filepath string) (result *Mark, err error)

func (*Mark) WriteFile

func (m *Mark) WriteFile(filename string) error

type Meta

type Meta yaml.MapSlice

func (Meta) Get

func (m Meta) Get(path string) interface{}

Get returns the value by path

{
  "a": {
    "b": {
      "c": 1
    }
  }
}

e.g. Get("a.b.c") returns 1

func (Meta) GetBool

func (m Meta) GetBool(path string) bool

func (Meta) GetString

func (m Meta) GetString(path string) string

func (Meta) GetStringSlice

func (m Meta) GetStringSlice(path string) []string

func (Meta) Set

func (m Meta) Set(path string, value interface{}) Meta

Jump to

Keyboard shortcuts

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