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