mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
additional doc comments
This commit is contained in:
parent
bb8ee591d1
commit
530123dd9f
27
html.go
27
html.go
|
@ -22,20 +22,21 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// Html renderer configuration options.
|
||||
const (
|
||||
HTML_SKIP_HTML = 1 << iota
|
||||
HTML_SKIP_STYLE
|
||||
HTML_SKIP_IMAGES
|
||||
HTML_SKIP_LINKS
|
||||
HTML_SAFELINK
|
||||
HTML_TOC
|
||||
HTML_OMIT_CONTENTS
|
||||
HTML_COMPLETE_PAGE
|
||||
HTML_GITHUB_BLOCKCODE
|
||||
HTML_USE_XHTML
|
||||
HTML_USE_SMARTYPANTS
|
||||
HTML_SMARTYPANTS_FRACTIONS
|
||||
HTML_SMARTYPANTS_LATEX_DASHES
|
||||
HTML_SKIP_HTML = 1 << iota // skip preformatted HTML blocks
|
||||
HTML_SKIP_STYLE // skip embedded <style> elements
|
||||
HTML_SKIP_IMAGES // skip embedded images
|
||||
HTML_SKIP_LINKS // skip all links
|
||||
HTML_SAFELINK // only link to trusted protocols
|
||||
HTML_TOC // generate a table of contents
|
||||
HTML_OMIT_CONTENTS // skip the main contents (for a standalone table of contents)
|
||||
HTML_COMPLETE_PAGE // generate a complete HTML page
|
||||
HTML_GITHUB_BLOCKCODE // use github fenced code rendering rules
|
||||
HTML_USE_XHTML // generate XHTML output instead of HTML
|
||||
HTML_USE_SMARTYPANTS // enable smart punctuation substitutions
|
||||
HTML_SMARTYPANTS_FRACTIONS // enable smart fractions (with HTML_USE_SMARTYPANTS)
|
||||
HTML_SMARTYPANTS_LATEX_DASHES // enable LaTeX-style dashes (with HTML_USE_SMARTYPANTS)
|
||||
)
|
||||
|
||||
// Html is a type that implements the Renderer interface for HTML output.
|
||||
|
|
21
markdown.go
21
markdown.go
|
@ -13,6 +13,9 @@
|
|||
//
|
||||
//
|
||||
|
||||
// Blackfriday markdown processor.
|
||||
//
|
||||
// Translates plain text with simple formatting rules into HTML or LaTeX.
|
||||
package blackfriday
|
||||
|
||||
import (
|
||||
|
@ -25,15 +28,15 @@ const VERSION = "0.6"
|
|||
// These are the supported markdown parsing extensions.
|
||||
// OR these values together to select multiple extensions.
|
||||
const (
|
||||
EXTENSION_NO_INTRA_EMPHASIS = 1 << iota
|
||||
EXTENSION_TABLES
|
||||
EXTENSION_FENCED_CODE
|
||||
EXTENSION_AUTOLINK
|
||||
EXTENSION_STRIKETHROUGH
|
||||
EXTENSION_LAX_HTML_BLOCKS
|
||||
EXTENSION_SPACE_HEADERS
|
||||
EXTENSION_HARD_LINE_BREAK
|
||||
EXTENSION_TAB_SIZE_EIGHT
|
||||
EXTENSION_NO_INTRA_EMPHASIS = 1 << iota // ignore emphasis markers inside words
|
||||
EXTENSION_TABLES // render tables
|
||||
EXTENSION_FENCED_CODE // render fenced code blocks
|
||||
EXTENSION_AUTOLINK // detect embedded URLs that are not explicitly marked
|
||||
EXTENSION_STRIKETHROUGH // strikethrough text using ~~test~~
|
||||
EXTENSION_LAX_HTML_BLOCKS // loosen up HTML block parsing rules
|
||||
EXTENSION_SPACE_HEADERS // be strict about prefix header rules
|
||||
EXTENSION_HARD_LINE_BREAK // translate newlines into line breaks
|
||||
EXTENSION_TAB_SIZE_EIGHT // expand tabs to eight spaces instead of four
|
||||
)
|
||||
|
||||
// These are the possible flag values for the link renderer.
|
||||
|
|
Loading…
Reference in New Issue
Block a user