all repos — grayfriday @ c29209fcdacb19244702838b1b5b5a4cb6337ffd

blackfriday fork with a few changes

Add String() method to reference struct
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 02 Nov 2015 20:24:34 +0200
commit

c29209fcdacb19244702838b1b5b5a4cb6337ffd

parent

9e68ff937bf900f5da964350474414bc0951c69d

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M markdown.gomarkdown.go

@@ -20,6 +20,7 @@ package blackfriday

import ( "bytes" + "fmt" "strings" "unicode/utf8" )

@@ -514,6 +515,11 @@ title []byte

noteId int // 0 if not a footnote ref hasBlock bool text []byte +} + +func (r *reference) String() string { + return fmt.Sprintf("{link: %q, title: %q, text: %q, noteId: %d, hasBlock: %v}", + r.link, r.title, r.text, r.noteId, r.hasBlock) } // Check whether or not data starts with a reference link.