diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-04-25 10:05:55 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-04-27 23:53:56 +0200 |
commit | d7b54a4c37c39fce60c25a745bae1d5987b2b966 (patch) | |
tree | 1ab9d0438063c0bd45ee62d45fa67b3cd4c4536a /markup/goldmark/convert.go | |
parent | 13ceef7599fe84ec210adc98b90884ae3ab2881f (diff) |
markup/goldmark: Fix attribute nilpointer
Fixes 9819
Diffstat (limited to 'markup/goldmark/convert.go')
-rw-r--r-- | markup/goldmark/convert.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/markup/goldmark/convert.go b/markup/goldmark/convert.go index 9442ee9e7..ba85831b0 100644 --- a/markup/goldmark/convert.go +++ b/markup/goldmark/convert.go @@ -16,9 +16,6 @@ package goldmark import ( "bytes" - "fmt" - "path/filepath" - "runtime/debug" "github.com/gohugoio/hugo/markup/goldmark/codeblocks" "github.com/gohugoio/hugo/markup/goldmark/internal/extensions/attributes" @@ -26,11 +23,6 @@ import ( "github.com/gohugoio/hugo/identity" - "github.com/pkg/errors" - - "github.com/spf13/afero" - - "github.com/gohugoio/hugo/hugofs" "github.com/gohugoio/hugo/markup/converter" "github.com/gohugoio/hugo/markup/tableofcontents" "github.com/yuin/goldmark" @@ -178,16 +170,6 @@ func (c converterResult) GetIdentities() identity.Identities { var converterIdentity = identity.KeyValueIdentity{Key: "goldmark", Value: "converter"} func (c *goldmarkConverter) Convert(ctx converter.RenderContext) (result converter.Result, err error) { - defer func() { - if r := recover(); r != nil { - dir := afero.GetTempDir(hugofs.Os, "hugo_bugs") - name := fmt.Sprintf("goldmark_%s.txt", c.ctx.DocumentID) - filename := filepath.Join(dir, name) - afero.WriteFile(hugofs.Os, filename, ctx.Src, 07555) - fmt.Print(string(debug.Stack())) - err = errors.Errorf("[BUG] goldmark: %s: create an issue on GitHub attaching the file in: %s", r, filename) - } - }() buf := &render.BufWriter{Buffer: &bytes.Buffer{}} result = buf |