Add String() method to reference struct
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 02 Nov 2015 20:24:34 +0200
1 files changed,
6 insertions(+),
0 deletions(-)
jump to
M
markdown.go
→
markdown.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.