all repos — grayfriday @ 32802dbae5247c217e17c256cded2960591aa969

blackfriday fork with a few changes

Go style: rename Toc to TOC
Vytautas Ĺ altenis vytas@rtfb.lt
Fri, 01 Apr 2016 13:12:38 +0300
commit

32802dbae5247c217e17c256cded2960591aa969

parent

f1361aa0da306b57ae030017cc7451f2b2419942

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M html.gohtml.go

@@ -38,7 +38,7 @@ Safelink // Only link to trusted protocols

NofollowLinks // Only link with rel="nofollow" NoreferrerLinks // Only link with rel="noreferrer" HrefTargetBlank // Add a blank target - Toc // Generate a table of contents + TOC // Generate a table of contents OmitContents // Skip the main contents (for a standalone table of contents) CompletePage // Generate a complete HTML page UseXHTML // Generate XHTML output instead of HTML

@@ -249,7 +249,7 @@

func (r *HTML) BeginHeader(level int, id string) { r.w.Newline() - if id == "" && r.flags&Toc != 0 { + if id == "" && r.flags&TOC != 0 { id = fmt.Sprintf("toc_%d", r.headerCount) }

@@ -272,7 +272,7 @@ }

func (r *HTML) EndHeader(level int, id string, header []byte) { // are we building a table of contents? - if r.flags&Toc != 0 { + if r.flags&TOC != 0 { r.TocHeaderWithAnchor(header, level, id) }

@@ -733,7 +733,7 @@ }

func (r *HTML) DocumentFooter() { // finalize and insert the table of contents - if r.flags&Toc != 0 { + if r.flags&TOC != 0 { r.TocFinalize() // now we have to insert the table of contents into the document