66 "fmt"
77
88 . "gist.github.com/6418290.git"
9-
10- "github.com/shurcooL/go-goon"
119)
1210
1311type debugRenderer struct {
@@ -18,126 +16,101 @@ func NewRenderer() *debugRenderer {
1816}
1917
2018func (_ * debugRenderer ) BlockCode (out * bytes.Buffer , text []byte , lang string ) {
21- fmt .Println (GetParentFuncAsString ())
22- goon .DumpExpr (string (text ), lang )
19+ fmt .Println (GetParentFuncArgsAsString (string (text ), lang ))
2320}
2421func (_ * debugRenderer ) BlockQuote (out * bytes.Buffer , text []byte ) {
25- fmt .Println (GetParentFuncAsString ())
26- goon .DumpExpr (string (text ))
22+ fmt .Println (GetParentFuncArgsAsString (string (text )))
2723}
2824func (_ * debugRenderer ) BlockHtml (out * bytes.Buffer , text []byte ) {
29- fmt .Println (GetParentFuncAsString ())
30- goon .DumpExpr (string (text ))
25+ fmt .Println (GetParentFuncArgsAsString (string (text )))
3126}
3227func (_ * debugRenderer ) Header (out * bytes.Buffer , text func () bool , level int , id string ) {
33- fmt .Println (GetParentFuncAsString ())
34- goon .DumpExpr (text (), level , id )
28+ fmt .Println (GetParentFuncArgsAsString (text (), level , id ))
3529}
3630func (_ * debugRenderer ) HRule (out * bytes.Buffer ) {
37- fmt .Println (GetParentFuncAsString ())
31+ fmt .Println (GetParentFuncArgsAsString ())
3832}
3933func (_ * debugRenderer ) List (out * bytes.Buffer , text func () bool , flags int ) {
40- fmt .Println (GetParentFuncAsString ())
41- goon .DumpExpr (text (), flags )
34+ fmt .Println (GetParentFuncArgsAsString (text (), flags ))
4235}
4336func (_ * debugRenderer ) ListItem (out * bytes.Buffer , text []byte , flags int ) {
44- fmt .Println (GetParentFuncAsString ())
45- goon .DumpExpr (string (text ), flags )
37+ fmt .Println (GetParentFuncArgsAsString (string (text ), flags ))
4638}
4739func (_ * debugRenderer ) Paragraph (out * bytes.Buffer , text func () bool ) {
48- fmt .Println (GetParentFuncAsString ())
49- goon .DumpExpr (text ())
40+ fmt .Println (GetParentFuncArgsAsString (text ()))
5041}
5142func (_ * debugRenderer ) Table (out * bytes.Buffer , header []byte , body []byte , columnData []int ) {
52- fmt .Println (GetParentFuncAsString ())
53- goon .DumpExpr (string (header ), string (body ), columnData )
43+ fmt .Println (GetParentFuncArgsAsString (string (header ), string (body ), columnData ))
5444}
5545func (_ * debugRenderer ) TableRow (out * bytes.Buffer , text []byte ) {
56- fmt .Println (GetParentFuncAsString ())
57- goon .DumpExpr (string (text ))
46+ fmt .Println (GetParentFuncArgsAsString (string (text )))
5847}
59- func (_ * debugRenderer ) TableHeaderCell (out * bytes.Buffer , text []byte , flags int ) {
60- fmt .Println (GetParentFuncAsString ())
61- goon .DumpExpr (string (text ), flags )
48+ func (_ * debugRenderer ) TableHeaderCell (out * bytes.Buffer , text []byte , align int ) {
49+ fmt .Println (GetParentFuncArgsAsString (string (text ), align ))
6250}
63- func (_ * debugRenderer ) TableCell (out * bytes.Buffer , text []byte , flags int ) {
64- fmt .Println (GetParentFuncAsString ())
65- goon .DumpExpr (string (text ), flags )
51+ func (_ * debugRenderer ) TableCell (out * bytes.Buffer , text []byte , align int ) {
52+ fmt .Println (GetParentFuncArgsAsString (string (text ), align ))
6653}
6754func (_ * debugRenderer ) Footnotes (out * bytes.Buffer , text func () bool ) {
68- fmt .Println (GetParentFuncAsString ())
69- goon .DumpExpr (text ())
55+ fmt .Println (GetParentFuncArgsAsString (text ()))
7056}
7157func (_ * debugRenderer ) FootnoteItem (out * bytes.Buffer , name , text []byte , flags int ) {
72- fmt .Println (GetParentFuncAsString ())
73- goon .DumpExpr (string (name ), string (text ), flags )
58+ fmt .Println (GetParentFuncArgsAsString (string (name ), string (text ), flags ))
7459}
7560
7661func (_ * debugRenderer ) AutoLink (out * bytes.Buffer , link []byte , kind int ) {
77- fmt .Println (GetParentFuncAsString ())
78- goon .DumpExpr (string (link ), kind )
62+ fmt .Println (GetParentFuncArgsAsString (string (link ), kind ))
7963}
8064func (_ * debugRenderer ) CodeSpan (out * bytes.Buffer , text []byte ) {
81- fmt .Println (GetParentFuncAsString ())
82- goon .DumpExpr (string (text ))
65+ fmt .Println (GetParentFuncArgsAsString (string (text )))
8366}
8467func (_ * debugRenderer ) DoubleEmphasis (out * bytes.Buffer , text []byte ) {
85- fmt .Println (GetParentFuncAsString ())
86- goon .DumpExpr (string (text ))
68+ fmt .Println (GetParentFuncArgsAsString (string (text )))
8769}
8870func (_ * debugRenderer ) Emphasis (out * bytes.Buffer , text []byte ) {
89- fmt .Println (GetParentFuncAsString ())
90- goon .DumpExpr (string (text ))
71+ fmt .Println (GetParentFuncArgsAsString (string (text )))
9172}
9273func (_ * debugRenderer ) Image (out * bytes.Buffer , link []byte , title []byte , alt []byte ) {
93- fmt .Println (GetParentFuncAsString ())
94- goon .DumpExpr (string (link ), string (title ), string (alt ))
74+ fmt .Println (GetParentFuncArgsAsString (string (link ), string (title ), string (alt )))
9575}
9676func (_ * debugRenderer ) LineBreak (out * bytes.Buffer ) {
97- fmt .Println (GetParentFuncAsString ())
77+ fmt .Println (GetParentFuncArgsAsString ())
9878}
9979func (_ * debugRenderer ) Link (out * bytes.Buffer , link []byte , title []byte , content []byte ) {
100- fmt .Println (GetParentFuncAsString ())
101- goon .DumpExpr (string (link ), string (title ), string (content ))
80+ fmt .Println (GetParentFuncArgsAsString (string (link ), string (title ), string (content )))
10281}
10382func (_ * debugRenderer ) RawHtmlTag (out * bytes.Buffer , tag []byte ) {
104- fmt .Println (GetParentFuncAsString ())
105- goon .DumpExpr (string (tag ))
83+ fmt .Println (GetParentFuncArgsAsString (string (tag )))
10684}
10785func (_ * debugRenderer ) TripleEmphasis (out * bytes.Buffer , text []byte ) {
108- fmt .Println (GetParentFuncAsString ())
109- goon .DumpExpr (string (text ))
86+ fmt .Println (GetParentFuncArgsAsString (string (text )))
11087}
11188func (_ * debugRenderer ) StrikeThrough (out * bytes.Buffer , text []byte ) {
112- fmt .Println (GetParentFuncAsString ())
113- goon .DumpExpr (string (text ))
89+ fmt .Println (GetParentFuncArgsAsString (string (text )))
11490}
11591func (_ * debugRenderer ) FootnoteRef (out * bytes.Buffer , ref []byte , id int ) {
116- fmt .Println (GetParentFuncAsString ())
117- goon .DumpExpr (string (ref ), id )
92+ fmt .Println (GetParentFuncArgsAsString (string (ref ), id ))
11893}
11994
12095func (_ * debugRenderer ) Entity (out * bytes.Buffer , entity []byte ) {
121- fmt .Println (GetParentFuncAsString ())
122- goon .DumpExpr (string (entity ))
96+ fmt .Println (GetParentFuncArgsAsString (string (entity )))
12397
12498 out .Write (entity )
12599}
126100func (_ * debugRenderer ) NormalText (out * bytes.Buffer , text []byte ) {
127- fmt .Println (GetParentFuncAsString ())
128- goon .DumpExpr (string (text ))
101+ fmt .Println (GetParentFuncArgsAsString (string (text )))
129102
130103 out .Write (text )
131104}
132105
133106func (_ * debugRenderer ) DocumentHeader (out * bytes.Buffer ) {
134- fmt .Println (GetParentFuncAsString ())
107+ fmt .Println (GetParentFuncArgsAsString ())
135108}
136109func (_ * debugRenderer ) DocumentFooter (out * bytes.Buffer ) {
137- fmt .Println (GetParentFuncAsString ())
110+ fmt .Println (GetParentFuncArgsAsString ())
138111}
139112
140113func (_ * debugRenderer ) GetFlags () int {
141- fmt .Println (GetParentFuncAsString ())
114+ fmt .Println (GetParentFuncArgsAsString ())
142115 return 0
143116}
0 commit comments