go fmt
This commit is contained in:
parent
ac729cbd2f
commit
178d014fcf
@ -1,13 +1,13 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/knieriem/markdown"
|
"github.com/knieriem/markdown"
|
||||||
"os"
|
|
||||||
"bufio"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -32,8 +32,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
e := markdown.Extensions{
|
e := markdown.Extensions{
|
||||||
Notes: *optNotes,
|
Notes: *optNotes,
|
||||||
Smart: *optSmart,
|
Smart: *optSmart,
|
||||||
Dlists: *optDlists,
|
Dlists: *optDlists,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
markdown.go
15
markdown.go
@ -20,21 +20,20 @@ package markdown
|
|||||||
// implements Parse()
|
// implements Parse()
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"log"
|
"log"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Markdown Extensions:
|
// Markdown Extensions:
|
||||||
type Extensions struct {
|
type Extensions struct {
|
||||||
Smart bool
|
Smart bool
|
||||||
Notes bool
|
Notes bool
|
||||||
FilterHTML bool
|
FilterHTML bool
|
||||||
FilterStyles bool
|
FilterStyles bool
|
||||||
Dlists bool
|
Dlists bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Parse converts a Markdown document into a tree for later output processing.
|
// Parse converts a Markdown document into a tree for later output processing.
|
||||||
func Parse(text string, ext Extensions) *Doc {
|
func Parse(text string, ext Extensions) *Doc {
|
||||||
d := new(Doc)
|
d := new(Doc)
|
||||||
@ -70,7 +69,6 @@ func (d *Doc) parseMarkdown(text string) *element {
|
|||||||
return d.tree
|
return d.tree
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* process_raw_blocks - traverses an element list, replacing any RAW elements with
|
/* process_raw_blocks - traverses an element list, replacing any RAW elements with
|
||||||
* the result of parsing them as markdown text, and recursing into the children
|
* the result of parsing them as markdown text, and recursing into the children
|
||||||
* of parent elements. The result should be a tree of elements without any RAWs.
|
* of parent elements. The result should be a tree of elements without any RAWs.
|
||||||
@ -104,7 +102,6 @@ func (d *Doc) processRawBlocks(input *element) *element {
|
|||||||
return input
|
return input
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TABSTOP = 4
|
TABSTOP = 4
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user