This commit is contained in:
Michael Teichgräber 2012-04-20 13:36:59 +02:00
parent ac729cbd2f
commit 178d014fcf
2 changed files with 10 additions and 13 deletions

View File

@ -1,13 +1,13 @@
package main
import (
"bufio"
"flag"
"fmt"
"github.com/knieriem/markdown"
"os"
"bufio"
"io/ioutil"
"log"
"os"
"runtime/pprof"
)
@ -32,8 +32,8 @@ func main() {
}
e := markdown.Extensions{
Notes: *optNotes,
Smart: *optSmart,
Notes: *optNotes,
Smart: *optSmart,
Dlists: *optDlists,
}

View File

@ -20,21 +20,20 @@ package markdown
// implements Parse()
import (
"strings"
"bytes"
"log"
"strings"
)
// Markdown Extensions:
type Extensions struct {
Smart bool
Notes bool
FilterHTML bool
FilterStyles bool
Dlists bool
Smart bool
Notes bool
FilterHTML bool
FilterStyles bool
Dlists bool
}
// Parse converts a Markdown document into a tree for later output processing.
func Parse(text string, ext Extensions) *Doc {
d := new(Doc)
@ -70,7 +69,6 @@ func (d *Doc) parseMarkdown(text string) *element {
return d.tree
}
/* 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
* 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
}
const (
TABSTOP = 4
)