adoc/format/text.go

17 lines
224 B
Go
Raw Normal View History

2022-03-17 16:20:59 +01:00
package format
import (
"fmt"
"ewintr.nl/adoc"
)
func Text(doc *adoc.ADoc) string {
txt := fmt.Sprintf("%s\n\n", doc.Title)
for _, el := range doc.Content {
txt += fmt.Sprintf("%s\n\n", el.Text())
}
return txt
}