gofmt
This commit is contained in:
parent
5bccaab30c
commit
4626c2b169
@ -2,10 +2,10 @@ package markdown
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"strings"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
10
parser.leg
10
parser.leg
@ -23,8 +23,8 @@ package markdown
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
|
||||||
"log"
|
"log"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -854,12 +854,10 @@ DefMarker = &{ p.extension.Dlists } Defmark
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List manipulation functions
|
* List manipulation functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* cons - cons an element onto a list, returning pointer to new head
|
/* cons - cons an element onto a list, returning pointer to new head
|
||||||
*/
|
*/
|
||||||
func cons(new, list *element) *element {
|
func cons(new, list *element) *element {
|
||||||
@ -878,14 +876,12 @@ func reverse(list *element) (new *element) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Auxiliary functions for parsing actions.
|
* Auxiliary functions for parsing actions.
|
||||||
* These make it easier to build up data structures (including lists)
|
* These make it easier to build up data structures (including lists)
|
||||||
* in the parsing actions.
|
* in the parsing actions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* p.mkElem - generic constructor for element
|
/* p.mkElem - generic constructor for element
|
||||||
*/
|
*/
|
||||||
func (p *yyParser) mkElem(key int) *element {
|
func (p *yyParser) mkElem(key int) *element {
|
||||||
@ -943,7 +939,6 @@ func (p *yyParser) mkLink(label *element, url, title string) (el *element) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* match_inlines - returns true if inline lists match (case-insensitive...)
|
/* match_inlines - returns true if inline lists match (case-insensitive...)
|
||||||
*/
|
*/
|
||||||
func match_inlines(l1, l2 *element) bool {
|
func match_inlines(l1, l2 *element) bool {
|
||||||
@ -973,7 +968,6 @@ func match_inlines(l1, l2 *element) bool {
|
|||||||
return l1 == nil && l2 == nil /* return true if both lists exhausted */
|
return l1 == nil && l2 == nil /* return true if both lists exhausted */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* find_reference - return true if link found in references matching label.
|
/* find_reference - return true if link found in references matching label.
|
||||||
* 'link' is modified with the matching url and title.
|
* 'link' is modified with the matching url and title.
|
||||||
*/
|
*/
|
||||||
@ -987,7 +981,6 @@ func (p *yyParser) findReference(label *element) (*link, bool) {
|
|||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* find_note - return true if note found in notes matching label.
|
/* find_note - return true if note found in notes matching label.
|
||||||
* if found, 'result' is set to point to matched note.
|
* if found, 'result' is set to point to matched note.
|
||||||
*/
|
*/
|
||||||
@ -1000,7 +993,6 @@ func (p *yyParser) find_note(label string) (*element, bool) {
|
|||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* print tree of elements, for debugging only.
|
/* print tree of elements, for debugging only.
|
||||||
*/
|
*/
|
||||||
func print_tree(w io.Writer, elt *element, indent int) {
|
func print_tree(w io.Writer, elt *element, indent int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user