Skip to content

Commit

Permalink
readme: Update extra extension example
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed May 4, 2024
1 parent 79651f0 commit 46c7291
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,16 @@ import (
"fmt"

"github.com/gohugoio/hugo-goldmark-extensions/extras"
"github.com/gohugoio/hugo-goldmark-extensions/extras/ast"
"github.com/yuin/goldmark"
)

func main() {
md := goldmark.New(
goldmark.WithExtensions(
extras.New(extras.Config{InlineTagType: ast.Insert}),
extras.New(extras.Config{InlineTagType: ast.Mark}),
extras.New(extras.Config{InlineTagType: ast.Subscript}),
extras.New(extras.Config{InlineTagType: ast.Superscript}),
))

goldmark.WithExtensions(extras.New(extras.Config{Insert: extras.InsertConfig{Enable: true}})),
goldmark.WithExtensions(extras.New(extras.Config{Mark: extras.MarkConfig{Enable: true}})),
goldmark.WithExtensions(extras.New(extras.Config{Subscript: extras.SubscriptConfig{Enable: true}})),
goldmark.WithExtensions(extras.New(extras.Config{Superscript: extras.SuperscriptConfig{Enable: true}})),
)
input := `
Hydrogen (H) is the 1^st^ element in the periodic table.
Expand Down

0 comments on commit 46c7291

Please sign in to comment.