Merge pull request #131 from russross/minor-cleanup

Minor cleanup.
This commit is contained in:
Vytautas Šaltenis 2014-11-30 09:02:35 +02:00
commit 48aaef5fbf
3 changed files with 22 additions and 24 deletions

View File

@ -1,6 +1,4 @@
[![Build Status](https://travis-ci.org/russross/blackfriday.svg?branch=master)](https://travis-ci.org/russross/blackfriday) Blackfriday [![Build Status](https://travis-ci.org/russross/blackfriday.svg?branch=master)](https://travis-ci.org/russross/blackfriday)
Blackfriday
=========== ===========
Blackfriday is a [Markdown][1] processor implemented in [Go][2]. It Blackfriday is a [Markdown][1] processor implemented in [Go][2]. It
@ -231,7 +229,6 @@ Todo
---- ----
* More unit testing * More unit testing
* Markdown pretty-printer output engine
* Improve unicode support. It does not understand all unicode * Improve unicode support. It does not understand all unicode
rules (about what constitutes a letter, a punctuation symbol, rules (about what constitutes a letter, a punctuation symbol,
etc.), so it may fail to detect word boundaries correctly in etc.), so it may fail to detect word boundaries correctly in

View File

@ -15,6 +15,7 @@ package blackfriday
import ( import (
"bytes" "bytes"
"github.com/shurcooL/go/github_flavored_markdown/sanitized_anchor_name" "github.com/shurcooL/go/github_flavored_markdown/sanitized_anchor_name"
) )

32
html.go
View File

@ -25,22 +25,22 @@ import (
// Html renderer configuration options. // Html renderer configuration options.
const ( const (
HTML_SKIP_HTML = 1 << iota // skip preformatted HTML blocks HTML_SKIP_HTML = 1 << iota // skip preformatted HTML blocks
HTML_SKIP_STYLE // skip embedded <style> elements HTML_SKIP_STYLE // skip embedded <style> elements
HTML_SKIP_IMAGES // skip embedded images HTML_SKIP_IMAGES // skip embedded images
HTML_SKIP_LINKS // skip all links HTML_SKIP_LINKS // skip all links
HTML_SAFELINK // only link to trusted protocols HTML_SAFELINK // only link to trusted protocols
HTML_NOFOLLOW_LINKS // only link with rel="nofollow" HTML_NOFOLLOW_LINKS // only link with rel="nofollow"
HTML_HREF_TARGET_BLANK // add a blank target HTML_HREF_TARGET_BLANK // add a blank target
HTML_TOC // generate a table of contents HTML_TOC // generate a table of contents
HTML_OMIT_CONTENTS // skip the main contents (for a standalone 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_COMPLETE_PAGE // generate a complete HTML page
HTML_USE_XHTML // generate XHTML output instead of HTML HTML_USE_XHTML // generate XHTML output instead of HTML
HTML_USE_SMARTYPANTS // enable smart punctuation substitutions HTML_USE_SMARTYPANTS // enable smart punctuation substitutions
HTML_SMARTYPANTS_FRACTIONS // enable smart fractions (with HTML_USE_SMARTYPANTS) HTML_SMARTYPANTS_FRACTIONS // enable smart fractions (with HTML_USE_SMARTYPANTS)
HTML_SMARTYPANTS_LATEX_DASHES // enable LaTeX-style dashes (with HTML_USE_SMARTYPANTS) HTML_SMARTYPANTS_LATEX_DASHES // enable LaTeX-style dashes (with HTML_USE_SMARTYPANTS)
HTML_SMARTYPANTS_ANGLED_QUOTES // enable angled double quotes (with HTML_USE_SMARTYPANTS) for double quotes rendering HTML_SMARTYPANTS_ANGLED_QUOTES // enable angled double quotes (with HTML_USE_SMARTYPANTS) for double quotes rendering
HTML_FOOTNOTE_RETURN_LINKS // generate a link at the end of a footnote to return to the source HTML_FOOTNOTE_RETURN_LINKS // generate a link at the end of a footnote to return to the source
) )
var ( var (