add tests
This commit is contained in:
parent
906507e871
commit
70bb52bca9
2 changed files with 17 additions and 5 deletions
4
main.go
4
main.go
|
@ -29,9 +29,9 @@ func main() {
|
|||
}
|
||||
|
||||
s := pipe.New()
|
||||
s.Use(mdproc.Preproc())
|
||||
s.Use(mdproc.RemoveFrontMatter)
|
||||
s.Use(mdproc.Preprocessor())
|
||||
s.Use(mdproc.RemoveComments)
|
||||
s.Use(mdproc.RemoveFrontMatter)
|
||||
s.Use(mdproc.FormatHeadings)
|
||||
s.Use(mdproc.FormatLinks)
|
||||
s.Handle(source(r), sink(w))
|
||||
|
|
|
@ -20,6 +20,10 @@ comment -->
|
|||
> this is
|
||||
a quote
|
||||
|
||||
*not a list*
|
||||
|
||||
**also not a list**
|
||||
|
||||
- this
|
||||
- is
|
||||
* an unordered
|
||||
|
@ -43,6 +47,10 @@ and
|
|||
|
||||
> this is a quote
|
||||
|
||||
*not a list*
|
||||
|
||||
**also not a list**
|
||||
|
||||
- this
|
||||
- is
|
||||
- an unordered
|
||||
|
@ -67,6 +75,10 @@ this is code too
|
|||
|
||||
> this is a quote
|
||||
|
||||
*not a list*
|
||||
|
||||
**also not a list**
|
||||
|
||||
- this
|
||||
- is
|
||||
- an unordered
|
||||
|
@ -124,7 +136,7 @@ func TestPreproc(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
s := pipe.New()
|
||||
s.Use(mdproc.Preproc())
|
||||
s.Use(mdproc.Preprocessor())
|
||||
s.Handle(source(t, input), sink(t, preproc))
|
||||
}
|
||||
|
||||
|
@ -132,9 +144,9 @@ func TestMd2Gmi(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
s := pipe.New()
|
||||
s.Use(mdproc.Preproc())
|
||||
s.Use(mdproc.RemoveFrontMatter)
|
||||
s.Use(mdproc.Preprocessor())
|
||||
s.Use(mdproc.RemoveComments)
|
||||
s.Use(mdproc.RemoveFrontMatter)
|
||||
s.Use(mdproc.FormatHeadings)
|
||||
s.Use(mdproc.FormatLinks)
|
||||
s.Handle(source(t, input), sink(t, gmi))
|
||||
|
|
Loading…
Reference in a new issue