document

package
Version: v0.0.0-...-725082c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: BSD-2-Clause Imports: 11 Imported by: 2

Documentation

Overview

A markdown processor. Converts markdown to an internal format that may be rendered later as HTML or treated as data

The markdown does follow mostly the de-facto rules, but not all.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanToLower

func CleanToLower(s string) string

func Normalize

func Normalize(s string) string

Types

type Document

type Document struct {
	// contains filtered or unexported fields
}

func New

func New(s string) (*Document, error)

New parses a markdown+ text string and returnes a Document object.

func (*Document) Data

func (doc *Document) Data() *ogdl.Graph

Data returns the Document as OGDL data

func (*Document) Html

func (doc *Document) Html() string

Html returnes the Document in HTML format

func (*Document) HtmlNoHeader

func (doc *Document) HtmlNoHeader() string

Html returnes the Document in HTML format, but skip the first header

func (doc *Document) HtmlWithLinks(urlbase string) string

Html returnes the Document in HTML format

func (*Document) Para1

func (doc *Document) Para1() string

Return the first paragraph of this document

func (*Document) Part

func (doc *Document) Part(path string) *Document

Part returns the part of the document indicated by the given path.

func (*Document) Raw

func (doc *Document) Raw() *ogdl.Graph

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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