all repos — grayfriday @ 2a07386455d11afe616a6184c03e88a1c969316b

blackfriday fork with a few changes

Rename HtmlFlags to HTMLFlags to adhere to Go style
Vytautas Ĺ altenis vytas@rtfb.lt
Fri, 01 Apr 2016 10:49:23 +0300
commit

2a07386455d11afe616a6184c03e88a1c969316b

parent

71fe9a191ecf3fc27343e04eae4c923d13161d4c

3 files changed, 11 insertions(+), 11 deletions(-)

jump to
M html.gohtml.go

@@ -25,12 +25,12 @@ "strconv"

"strings" ) -type HtmlFlags int +type HTMLFlags int // HTML renderer configuration options. const ( - HtmlFlagsNone HtmlFlags = 0 - SkipHTML HtmlFlags = 1 << iota // Skip preformatted HTML blocks + HTMLFlagsNone HTMLFlags = 0 + SkipHTML HTMLFlags = 1 << iota // Skip preformatted HTML blocks SkipStyle // Skip embedded <style> elements SkipImages // Skip embedded images SkipLinks // Skip all links

@@ -88,7 +88,7 @@ // HTML is a type that implements the Renderer interface for HTML output.

// // Do not create this directly, instead use the HtmlRenderer function. type HTML struct { - flags HtmlFlags + flags HTMLFlags closeTag string // how to end singleton tags: either " />" or ">" title string // document title css string // optional css file url (used with HTML_COMPLETE_PAGE)

@@ -119,11 +119,11 @@

// HtmlRenderer creates and configures an HTML object, which // satisfies the Renderer interface. // -// flags is a set of HtmlFlags ORed together. +// flags is a set of HTMLFlags ORed together. // title is the title of the document, and css is a URL for the document's // stylesheet. // title and css are only used when HTML_COMPLETE_PAGE is selected. -func HtmlRenderer(flags HtmlFlags, extensions Extensions, title string, css string) Renderer { +func HtmlRenderer(flags HTMLFlags, extensions Extensions, title string, css string) Renderer { return HtmlRendererWithParameters(flags, extensions, title, css, HtmlRendererParameters{}) }

@@ -153,7 +153,7 @@ func (r *HTML) Write(b []byte) (int, error) {

return r.w.Write(b) } -func HtmlRendererWithParameters(flags HtmlFlags, extensions Extensions, title string, +func HtmlRendererWithParameters(flags HTMLFlags, extensions Extensions, title string, css string, renderParameters HtmlRendererParameters) Renderer { // configure the rendering engine closeTag := htmlClose

@@ -976,7 +976,7 @@ }

return link } -func appendLinkAttrs(attrs []string, flags HtmlFlags, link []byte) []string { +func appendLinkAttrs(attrs []string, flags HTMLFlags, link []byte) []string { if isRelativeLink(link) { return attrs }
M inline_test.goinline_test.go

@@ -20,7 +20,7 @@

"strings" ) -func runMarkdownInline(input string, opts Options, htmlFlags HtmlFlags, params HtmlRendererParameters) string { +func runMarkdownInline(input string, opts Options, htmlFlags HTMLFlags, params HtmlRendererParameters) string { opts.Extensions |= Autolink opts.Extensions |= Strikethrough

@@ -56,7 +56,7 @@ transformTests := transformLinks(tests, prefix)

doTestsInlineParam(t, transformTests, Options{}, Safelink, params) } -func doTestsInlineParam(t *testing.T, tests []string, opts Options, htmlFlags HtmlFlags, +func doTestsInlineParam(t *testing.T, tests []string, opts Options, htmlFlags HTMLFlags, params HtmlRendererParameters) { // catch and report panics var candidate string
M markdown.gomarkdown.go

@@ -55,7 +55,7 @@ SmartypantsDashes // Enable smart dashes (with Smartypants)

SmartypantsLatexDashes // Enable LaTeX-style dashes (with Smartypants) SmartypantsAngledQuotes // Enable angled double quotes (with Smartypants) for double quotes rendering - CommonHtmlFlags HtmlFlags = UseXHTML + CommonHtmlFlags HTMLFlags = UseXHTML CommonExtensions Extensions = NoIntraEmphasis | Tables | FencedCode | Autolink | Strikethrough | SpaceHeaders | HeaderIDs |