@@ -336,7 +336,7 @@ func footnoteReturnLink(prefix, returnLink string, slug []byte) string {
336336}
337337
338338func listItemOpenCR (listItem * ast.ListItem ) bool {
339- if ast .PrevNode (listItem ) == nil {
339+ if ast .GetPrevNode (listItem ) == nil {
340340 return false
341341 }
342342 ld := listItem .Parent .(* ast.List )
@@ -532,7 +532,7 @@ func (r *Renderer) imageExit(w io.Writer, image *ast.Image) {
532532func (r * Renderer ) paragraphEnter (w io.Writer , para * ast.Paragraph ) {
533533 // TODO: untangle this clusterfuck about when the newlines need
534534 // to be added and when not.
535- prev := ast .PrevNode (para )
535+ prev := ast .GetPrevNode (para )
536536 if prev != nil {
537537 switch prev .(type ) {
538538 case * ast.HTMLBlock , * ast.List , * ast.Paragraph , * ast.Heading , * ast.CodeBlock , * ast.BlockQuote , * ast.HorizontalRule :
@@ -551,7 +551,7 @@ func (r *Renderer) paragraphEnter(w io.Writer, para *ast.Paragraph) {
551551
552552func (r * Renderer ) paragraphExit (w io.Writer , para * ast.Paragraph ) {
553553 r .outs (w , "</p>" )
554- if ! (isListItem (para .Parent ) && ast .NextNode (para ) == nil ) {
554+ if ! (isListItem (para .Parent ) && ast .GetNextNode (para ) == nil ) {
555555 r .cr (w )
556556 }
557557}
@@ -611,7 +611,7 @@ func (r *Renderer) headingEnter(w io.Writer, nodeData *ast.Heading) {
611611
612612func (r * Renderer ) headingExit (w io.Writer , heading * ast.Heading ) {
613613 r .outs (w , headingCloseTagFromLevel (heading .Level ))
614- if ! (isListItem (heading .Parent ) && ast .NextNode (heading ) == nil ) {
614+ if ! (isListItem (heading .Parent ) && ast .GetNextNode (heading ) == nil ) {
615615 r .cr (w )
616616 }
617617}
@@ -675,7 +675,7 @@ func (r *Renderer) listExit(w io.Writer, list *ast.List) {
675675 parent := list .Parent
676676 switch parent .(type ) {
677677 case * ast.ListItem :
678- if ast .NextNode (list ) != nil {
678+ if ast .GetNextNode (list ) != nil {
679679 r .cr (w )
680680 }
681681 case * ast.Document , * ast.BlockQuote :
@@ -774,7 +774,7 @@ func (r *Renderer) tableCell(w io.Writer, tableCell *ast.TableCell, entering boo
774774 if align != "" {
775775 attrs = append (attrs , fmt .Sprintf (`align="%s"` , align ))
776776 }
777- if ast .PrevNode (tableCell ) == nil {
777+ if ast .GetPrevNode (tableCell ) == nil {
778778 r .cr (w )
779779 }
780780 r .outTag (w , openTag , attrs )
@@ -785,7 +785,7 @@ func (r *Renderer) tableBody(w io.Writer, node *ast.TableBody, entering bool) {
785785 r .cr (w )
786786 r .outs (w , "<tbody>" )
787787 // XXX: this is to adhere to a rather silly test. Should fix test.
788- if ast .FirstChild (node ) == nil {
788+ if ast .GetFirstChild (node ) == nil {
789789 r .cr (w )
790790 }
791791 } else {
0 commit comments