update readme

This commit is contained in:
Erik Winter 2022-06-11 10:48:27 +02:00
parent 3c3ea3c767
commit 16cbb646d3
1 changed files with 5 additions and 4 deletions

View File

@ -5,6 +5,8 @@ The beginnings of a parser for the https://asciidoc-py.github.io/index.html[Asci
== Example == Example
https://go.dev/play/p/hF2wn_GdkBK[Run the snippet below on the Go Playground]
---- ----
package main package main
@ -12,8 +14,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"ewintr.nl/adoc/format" "ewintr.nl/adoc"
"ewintr.nl/adoc/parser"
) )
func main() { func main() {
@ -27,10 +28,10 @@ And this is the first paragraph. With some text. Lists are supported too:
And we also have things like *bold* and _italic_.` And we also have things like *bold* and _italic_.`
par := parser.New(strings.NewReader(sourceDoc)) par := adoc.NewParser(strings.NewReader(sourceDoc))
doc := par.Parse() doc := par.Parse()
htmlDoc := format.HTML(doc) htmlDoc := adoc.NewHTMLFormatter().Format(doc)
fmt.Println(htmlDoc) fmt.Println(htmlDoc)
// output: // output: