Versions in this module Expand all Collapse all v0 v0.5.1 Jan 24, 2023 Changes in this version + var NotesEnabled = false + var PlayEnabled = false + func Register(name string, parser ParseFunc) + func Style(s string) template.HTML + func Template() *template.Template + type Author struct + Elem []Elem + func (p *Author) TextElem() (elems []Elem) + type Caption struct + Cmd string + Text string + func (c Caption) PresentCmd() string + func (c Caption) TemplateName() string + type Code struct + Cmd string + Edit bool + Ext string + FileName string + Play bool + Raw []byte + Text template.HTML + func (c Code) PresentCmd() string + func (c Code) TemplateName() string + type Context struct + ReadFile func(filename string) ([]byte, error) + func (ctx *Context) Parse(r io.Reader, name string, mode ParseMode) (*Doc, error) + type Doc struct + Authors []Author + OldURL []string + Sections []Section + Subtitle string + Summary string + Tags []string + Time time.Time + Title string + TitleNotes []string + func Parse(r io.Reader, name string, mode ParseMode) (*Doc, error) + func (d *Doc) Render(w io.Writer, t *template.Template) error + type Elem interface + TemplateName func() string + type HTML struct + Cmd string + func (s HTML) PresentCmd() string + func (s HTML) TemplateName() string + type Iframe struct + Cmd string + Height int + URL string + Width int + func (i Iframe) PresentCmd() string + func (i Iframe) TemplateName() string + type Image struct + Cmd string + Height int + URL string + Width int + func (i Image) PresentCmd() string + func (i Image) TemplateName() string + type Lines struct + type Link struct + Cmd string + Label string + URL *url.URL + func (l Link) PresentCmd() string + func (l Link) TemplateName() string + type List struct + Bullet []string + func (l List) TemplateName() string + type ParseFunc func(ctx *Context, fileName string, lineNumber int, inputLine string) (Elem, error) + type ParseMode int + const TitlesOnly + type Section struct + Classes []string + Elem []Elem + ID string + Notes []string + Number []int + Styles []string + Title string + func (s *Section) Render(w io.Writer, t *template.Template) error + func (s Section) FormattedNumber() string + func (s Section) HTMLAttributes() template.HTMLAttr + func (s Section) Level() int + func (s Section) Sections() (sections []Section) + func (s Section) TemplateName() string + type Text struct + Lines []string + Pre bool + Raw string + func (t Text) TemplateName() string + type Video struct + Cmd string + Height int + SourceType string + URL string + Width int + func (v Video) PresentCmd() string + func (v Video) TemplateName() string