From 46c7291cd5d5d5c7ecd3a85cb07c2c12e169bb86 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 4 May 2024 13:15:29 -0700 Subject: [PATCH] readme: Update extra extension example --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 43ef441..299c960 100644 --- a/README.md +++ b/README.md @@ -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.