From 246e082bb6ff1aeaf38eb2c8c980d8465bb84b25 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 5 May 2024 06:44:38 -0700 Subject: [PATCH] readme: Update extras extension example --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 43ef441..02c1a69 100644 --- a/README.md +++ b/README.md @@ -133,18 +133,20 @@ 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}, + Mark: extras.MarkConfig{Enable: true}, + Subscript: extras.SubscriptConfig{Enable: true}, + Superscript: extras.SuperscriptConfig{Enable: true}, + }, + )), + ) input := ` Hydrogen (H) is the 1^st^ element in the periodic table.