Add some documentation & split Document into Configuration+Document
This commit is contained in:
parent
c98cdea4f0
commit
56ecb2d401
9 changed files with 77 additions and 44 deletions
|
@ -9,7 +9,8 @@ import (
|
|||
|
||||
// Fuzz function to be used by https://github.com/dvyukov/go-fuzz
|
||||
func Fuzz(input []byte) int {
|
||||
d := NewDocument().Silent().Parse(bytes.NewReader(input))
|
||||
conf := New().Silent()
|
||||
d := conf.Parse(bytes.NewReader(input), "")
|
||||
orgOutput, err := d.Write(NewOrgWriter())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -18,7 +19,7 @@ func Fuzz(input []byte) int {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
htmlOutputB, err := NewDocument().Silent().Parse(strings.NewReader(orgOutput)).Write(NewHTMLWriter())
|
||||
htmlOutputB, err := conf.Parse(strings.NewReader(orgOutput)).Write(NewHTMLWriter())
|
||||
if htmlOutputA != htmlOutputB {
|
||||
panic("rendered org results in different html than original input")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue