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 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"
) )

View File

@ -20,9 +20,9 @@ package markdown
// implements Parse() // implements Parse()
import ( import (
"strings"
"bytes" "bytes"
"log" "log"
"strings"
) )
// Markdown Extensions: // Markdown Extensions:
@ -34,7 +34,6 @@ type Extensions struct {
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
) )