all repos — grayfriday @ 530123dd9f97193841b13e103a3381b413117126

blackfriday fork with a few changes

additional doc comments
Russ Ross russ@russross.com
Thu, 07 Jul 2011 12:05:29 -0600
commit

530123dd9f97193841b13e103a3381b413117126

parent

bb8ee591d10bb703df8501524ff5b9989364c077

2 files changed, 26 insertions(+), 22 deletions(-)

jump to
M html.gohtml.go

@@ -22,20 +22,21 @@ "strconv"

"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.
M markdown.gomarkdown.go

@@ -13,6 +13,9 @@ // Markdown parsing and processing

// // +// Blackfriday markdown processor. +// +// Translates plain text with simple formatting rules into HTML or LaTeX. package blackfriday import (

@@ -25,15 +28,15 @@

// 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.