From 15a323c5d37895fa5c997e2912c48aad0959c215 Mon Sep 17 00:00:00 2001 From: kpym Date: Sat, 17 Feb 2024 11:00:25 +0100 Subject: [PATCH] stop using mdigger's extension for attributes to resolve issue #1 --- gm_parameters.go | 3 +-- go.mod | 1 - go.sum | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/gm_parameters.go b/gm_parameters.go index 0431a1d..9c724e1 100644 --- a/gm_parameters.go +++ b/gm_parameters.go @@ -9,7 +9,6 @@ import ( "strings" chroma "github.com/alecthomas/chroma/formatters/html" - attributes "github.com/mdigger/goldmark-attributes" "github.com/spf13/pflag" "github.com/yuin/goldmark" emoji "github.com/yuin/goldmark-emoji" @@ -282,7 +281,7 @@ func setGoldMark() { extensions = append(extensions, emoji.Emoji) } if attribute { - goldmarkOptions = append(goldmarkOptions, attributes.Enable) + parserOptions = append(parserOptions, parser.WithAttribute()) } if unsafe { rendererOptions = append(rendererOptions, html.WithUnsafe()) diff --git a/go.mod b/go.mod index 9cf9d06..a4d0997 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/alecthomas/chroma v0.10.0 github.com/bmatcuk/doublestar/v4 v4.6.1 github.com/grokify/html-strip-tags-go v0.1.0 - github.com/mdigger/goldmark-attributes v0.0.0-20210529130523-52da21a6bf2b github.com/spf13/pflag v1.0.6-0.20201009195203-85dd5c8bc61c github.com/yuin/goldmark v1.5.6 github.com/yuin/goldmark-emoji v1.0.2 diff --git a/go.sum b/go.sum index 9aa2ede..771bda7 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,6 @@ github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/grokify/html-strip-tags-go v0.1.0 h1:03UrQLjAny8xci+R+qjCce/MYnpNXCtgzltlQbOBae4= github.com/grokify/html-strip-tags-go v0.1.0/go.mod h1:ZdzgfHEzAfz9X6Xe5eBLVblWIxXfYSQ40S/VKrAOGpc= -github.com/mdigger/goldmark-attributes v0.0.0-20210529130523-52da21a6bf2b h1:b7OaN0oQFTn5bhUhbNVA7q82fF5hnzNFhuYKDqJ78Ag= -github.com/mdigger/goldmark-attributes v0.0.0-20210529130523-52da21a6bf2b/go.mod h1:9c4hA7YdGQGp2KDiT149eXUg8Y6kFZNPo6hSBS68zV0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/spf13/pflag v1.0.6-0.20201009195203-85dd5c8bc61c h1:zqmyTlQyufRC65JnImJ6H1Sf7BDj8bG31EV919NVEQc=