Documentation
¶
Index ¶
- Constants
- Variables
- func Convert(scanner0 *bufio.Scanner, writer DocWriter) error
- type DocWriter
- type HTMLWriter
- func (w *HTMLWriter) CheckBox(checked bool) int
- func (w *HTMLWriter) Close()
- func (w *HTMLWriter) Code() int
- func (w *HTMLWriter) CodeBlock(lang string, title string) int
- func (w *HTMLWriter) Emphasis() int
- func (w *HTMLWriter) End(lv int)
- func (w *HTMLWriter) Heading(text string, level int) int
- func (w *HTMLWriter) Hr() int
- func (w *HTMLWriter) Image(url string, title, alt string, opt int) int
- func (w *HTMLWriter) Link(url string, title string, opt int) int
- func (w *HTMLWriter) List(mode int) int
- func (w *HTMLWriter) ListItem() int
- func (w *HTMLWriter) Paragraph() int
- func (w *HTMLWriter) QuoteBlock() int
- func (w *HTMLWriter) Strike() int
- func (w *HTMLWriter) Strong() int
- func (w *HTMLWriter) Table() int
- func (w *HTMLWriter) TableCell(flags int) int
- func (w *HTMLWriter) TableRow() int
- func (w *HTMLWriter) Write(text string)
- func (w *HTMLWriter) WriteStyle(text string, className string, color string, flags int)
- type LimitedReader
- type LinkInlineMatcher
- type Markdown
- type Matcher
- type PlainWriter
- func (w *PlainWriter) CheckBox(checked bool) int
- func (w *PlainWriter) Close()
- func (w *PlainWriter) Code() int
- func (w *PlainWriter) CodeBlock(lang string, title string) int
- func (w *PlainWriter) Emphasis() int
- func (w *PlainWriter) End(lv int)
- func (w *PlainWriter) Heading(text string, level int) int
- func (w *PlainWriter) Hr() int
- func (w *PlainWriter) Image(url string, title, alt string, opt int) int
- func (w *PlainWriter) Link(url string, title string, opt int) int
- func (w *PlainWriter) List(mode int) int
- func (w *PlainWriter) ListItem() int
- func (w *PlainWriter) Paragraph() int
- func (w *PlainWriter) QuoteBlock() int
- func (w *PlainWriter) Strike() int
- func (w *PlainWriter) Strong() int
- func (w *PlainWriter) Table() int
- func (w *PlainWriter) TableCell(flags int) int
- func (w *PlainWriter) TableRow() int
- func (w *PlainWriter) Write(text string)
- func (w *PlainWriter) WriteStyle(text string, className string, color string, flags int)
- type RegexMatcher
- type SimpleInlineMatcher
- type Tokenizer
Constants ¶
View Source
const CODE_Comment = 9
View Source
const CODE_EOF = -1
View Source
const CODE_Ident = 4
View Source
const CODE_Keyword = 0
View Source
const CODE_Number = 1
View Source
const CODE_String = 2
View Source
const CODE_UNKNOWN = 100
Variables ¶
View Source
var CKeywords = strings.Split("void,int,char,float,double,long,short,signed,unsigned,volatile,"+
"static,const,auto,for,if,else,do,while,continue,break,return,switch,case,default,typedef,enum,struct", ",")
View Source
var CppKeywords = strings.Split("class,public,private,protected,namespace,using,bool,new,delete", ",")
View Source
var DUMMY_DEPTH = 999999
View Source
var GoKeywords = strings.Split("package,import,var,type,for,if,else,continue,break,return,func,switch,case,default,int,string,map,float", ",")
View Source
var Keywords = map[string][]string{ "go": GoKeywords, "ruby": RubyKeywords, "rb": RubyKeywords, "rust": RustKeywords, "php": PhpKeywords, "perl": PerlKeywords, "pl": PerlKeywords, "c": CKeywords, "cpp": append(CKeywords, CppKeywords...), "js": append(CKeywords, strings.Split("var,function,new", ",")...), }
View Source
var PerlKeywords = strings.Split("for,foreach,if,else,elsif,do,while,next,last,return,sub,my,qw,local,require,use", ",")
View Source
var PhpKeywords = strings.Split("for,foreach,if,else,elseif,do,while,continue,break,new,class,return,catch,try,global,public,private,function,switch,case", ",")
View Source
var RubyKeywords = strings.Split("class,def,if,else,unless,do,next,begin,end,ensure,new,attr_accessor,return,require,require_relative", ",")
View Source
var RustKeywords = strings.Split("fn,let,enum,mod,struct,trait,type,use,impl,box,crate,where,true,false,self,super,"+
"if,else,match,for,loop,while,break,continue,return,as,in,const,static,pub,mut,move,ref,unsafe,extern", ",")
Functions ¶
Types ¶
type DocWriter ¶
type DocWriter interface {
Heading(text string, level int) int
Link(url string, title string, options int) int
Image(url string, title, alt string, options int) int
Hr() int
Strike() int
Emphasis() int
Strong() int
Code() int
Paragraph() int
List(mode int) int
ListItem() int
Table() int
TableRow() int
TableCell(flags int) int
CheckBox(checked bool) int
QuoteBlock() int
CodeBlock(lang string, title string) int
End(lv int)
Write(text string)
WriteStyle(text string, className string, color string, flags int)
Close()
}
type HTMLWriter ¶
type HTMLWriter struct {
// contains filtered or unexported fields
}
HTMLWriter : impl for DocWriter
func NewHTMLWriter ¶
func NewHTMLWriter(writer io.Writer) *HTMLWriter
func (*HTMLWriter) CheckBox ¶
func (w *HTMLWriter) CheckBox(checked bool) int
func (*HTMLWriter) Close ¶
func (w *HTMLWriter) Close()
func (*HTMLWriter) Code ¶
func (w *HTMLWriter) Code() int
func (*HTMLWriter) Emphasis ¶
func (w *HTMLWriter) Emphasis() int
func (*HTMLWriter) End ¶
func (w *HTMLWriter) End(lv int)
func (*HTMLWriter) Hr ¶
func (w *HTMLWriter) Hr() int
func (*HTMLWriter) List ¶
func (w *HTMLWriter) List(mode int) int
func (*HTMLWriter) ListItem ¶
func (w *HTMLWriter) ListItem() int
func (*HTMLWriter) Paragraph ¶
func (w *HTMLWriter) Paragraph() int
func (*HTMLWriter) QuoteBlock ¶
func (w *HTMLWriter) QuoteBlock() int
func (*HTMLWriter) Strike ¶
func (w *HTMLWriter) Strike() int
func (*HTMLWriter) Strong ¶
func (w *HTMLWriter) Strong() int
func (*HTMLWriter) Table ¶
func (w *HTMLWriter) Table() int
func (*HTMLWriter) TableCell ¶
func (w *HTMLWriter) TableCell(flags int) int
func (*HTMLWriter) TableRow ¶
func (w *HTMLWriter) TableRow() int
func (*HTMLWriter) Write ¶
func (w *HTMLWriter) Write(text string)
func (*HTMLWriter) WriteStyle ¶
func (w *HTMLWriter) WriteStyle(text string, className string, color string, flags int)
type LimitedReader ¶
type LimitedReader struct {
// contains filtered or unexported fields
}
type LinkInlineMatcher ¶
type LinkInlineMatcher struct {
Start string
}
func (*LinkInlineMatcher) Prefix ¶
func (m *LinkInlineMatcher) Prefix() string
func (*LinkInlineMatcher) Render ¶
func (m *LinkInlineMatcher) Render(params []string, md *state)
type PlainWriter ¶
type PlainWriter struct {
// contains filtered or unexported fields
}
PlainWriter : impl for DocWriter
func NewPlainWriter ¶
func NewPlainWriter(writer io.Writer) *PlainWriter
func (*PlainWriter) CheckBox ¶
func (w *PlainWriter) CheckBox(checked bool) int
func (*PlainWriter) Close ¶
func (w *PlainWriter) Close()
func (*PlainWriter) Code ¶
func (w *PlainWriter) Code() int
func (*PlainWriter) Emphasis ¶
func (w *PlainWriter) Emphasis() int
func (*PlainWriter) End ¶
func (w *PlainWriter) End(lv int)
func (*PlainWriter) Hr ¶
func (w *PlainWriter) Hr() int
func (*PlainWriter) List ¶
func (w *PlainWriter) List(mode int) int
func (*PlainWriter) ListItem ¶
func (w *PlainWriter) ListItem() int
func (*PlainWriter) Paragraph ¶
func (w *PlainWriter) Paragraph() int
func (*PlainWriter) QuoteBlock ¶
func (w *PlainWriter) QuoteBlock() int
func (*PlainWriter) Strike ¶
func (w *PlainWriter) Strike() int
func (*PlainWriter) Strong ¶
func (w *PlainWriter) Strong() int
func (*PlainWriter) Table ¶
func (w *PlainWriter) Table() int
func (*PlainWriter) TableCell ¶
func (w *PlainWriter) TableCell(flags int) int
func (*PlainWriter) TableRow ¶
func (w *PlainWriter) TableRow() int
func (*PlainWriter) Write ¶
func (w *PlainWriter) Write(text string)
func (*PlainWriter) WriteStyle ¶
func (w *PlainWriter) WriteStyle(text string, className string, color string, flags int)
type RegexMatcher ¶
type RegexMatcher struct {
PrefixStr string
Re *regexp.Regexp
RenderFunc func(matches []string, s *state, matcher *RegexMatcher)
}
func (*RegexMatcher) Prefix ¶
func (m *RegexMatcher) Prefix() string
func (*RegexMatcher) Render ¶
func (m *RegexMatcher) Render(params []string, s *state)
type SimpleInlineMatcher ¶
type SimpleInlineMatcher struct {
Start string
End string
RenderFunc func(content string, s *state, matcher *SimpleInlineMatcher)
}
func (*SimpleInlineMatcher) Prefix ¶
func (m *SimpleInlineMatcher) Prefix() string
func (*SimpleInlineMatcher) Render ¶
func (m *SimpleInlineMatcher) Render(params []string, s *state)
type Tokenizer ¶
func NewTokenizer ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
