yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

"Goldmark Runtime Error: Index out of Range" When Using Very Specific Pattern #122

Closed jordan-wright closed 4 years ago

jordan-wright commented 4 years ago

Please answer the following before submitting your issue:

  1. What version of goldmark are you using? : v1.1.28
  2. What version of Go are you using? : go 1.13.5
  3. What operating system and processor architecture are you using? : darwin/amd64
  4. What did you do? :

Ref https://github.com/gohugoio/hugo/issues/7172

I've encountered a bug in the implementation of Goldmark when a very specific pattern is used. In order to trigger the bug you:

For example: This will trigger the bug: '00s

This pattern is commonly used to abbreviate a decade of years, e.g. "Happened in the '00s".

I've tried variations on that pattern but, while there may be things I've missed, it seems to only trigger in very specific cases. For now, disabling smart quotes in Hugo has fixed the issue.

Here is a simple example that reproduces the bug:

goldmark_73a80b32c2e375f8aff4b771c3a6b9de.txt

  1. What did you expect to see? :

I expected to see the output rendered with a smart single quote, followed by the digits and the "s".

  1. What did you see instead? :

I'm using Hugo, and it crashed with a goldmark: runtime error: index out of range [4] with length 4 error. The full stack trace can be found below:

Building sites … WARN 2020/04/14 09:53:52 Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url
goroutine 137 [running]:
runtime/debug.Stack(0x5ec39a0, 0x6c3cf20, 0xc007128a00)
        /usr/local/Cellar/go/1.14.2/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/gohugoio/hugo/markup/goldmark.(*goldmarkConverter).Convert.func1(0xc00bb24900, 0xc00676a750, 0x35, 0x8b, 0x1, 0xc01568a7a0, 0xc0054ed270)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/markup/goldmark/convert.go:235 +0x203
panic(0x57f2860, 0xc00b83bc80)
        /usr/local/Cellar/go/1.14.2/libexec/src/runtime/panic.go:969 +0x166
github.com/yuin/goldmark/util.ToRune(0xc00676a780, 0x4, 0x5b, 0x4, 0x1)
        /Users/brew/Library/Caches/Homebrew/go_cache/pkg/mod/github.com/yuin/goldmark@v1.1.25/util/util.go:471 +0xa7
github.com/yuin/goldmark/extension.(*typographerParser).Parse(0xc0004b4e80, 0x5eceb80, 0xc015682380, 0x5ec6380, 0xc015686c60, 0x5ec8240, 0xc01568c170, 0x0, 0x0)
        /Users/brew/Library/Caches/Homebrew/go_cache/pkg/mod/github.com/yuin/goldmark@v1.1.25/extension/typographer.go:200 +0xb81
github.com/yuin/goldmark/parser.(*parser).parseBlock(0xc00044c000, 0x5ec6980, 0xc015686c60, 0x5eceb80, 0xc015682380, 0x5ec8240, 0xc01568c170)
        /Users/brew/Library/Caches/Homebrew/go_cache/pkg/mod/github.com/yuin/goldmark@v1.1.25/parser/parser.go:1163 +0x48b
github.com/yuin/goldmark/parser.(*parser).Parse.func2(0x5eceb80, 0xc015682380)
        /Users/brew/Library/Caches/Homebrew/go_cache/pkg/mod/github.com/yuin/goldmark@v1.1.25/parser/parser.go:852 +0x62
github.com/yuin/goldmark/parser.(*parser).walkBlock(0xc00044c000, 0x5eceb80, 0xc015682380, 0xc0054ed090)
        /Users/brew/Library/Caches/Homebrew/go_cache/pkg/mod/github.com/yuin/goldmark@v1.1.25/parser/parser.go:1103 +0xb0
github.com/yuin/goldmark/parser.(*parser).walkBlock(0xc00044c000, 0x5ece160, 0xc015682300, 0xc0054ed090)
        /Users/brew/Library/Caches/Homebrew/go_cache/pkg/mod/github.com/yuin/goldmark@v1.1.25/parser/parser.go:1101 +0x6d
github.com/yuin/goldmark/parser.(*parser).Parse(0xc00044c000, 0x5ec6440, 0xc008946540, 0xc0149fe510, 0x1, 0x1, 0xc01568c170, 0x401025d)
        /Users/brew/Library/Caches/Homebrew/go_cache/pkg/mod/github.com/yuin/goldmark@v1.1.25/parser/parser.go:851 +0x250
github.com/gohugoio/hugo/markup/goldmark.(*goldmarkConverter).Convert(0xc00bb24900, 0xc00676a750, 0x35, 0x8b, 0x1, 0xc01568a7a0, 0x5e878a0, 0xc0149fe500, 0x0, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/markup/goldmark/convert.go:245 +0x285
github.com/gohugoio/hugo/hugolib.(*pageContentOutput).renderContentWithConverter(0xc002d956c0, 0x5e98840, 0xc00bb24900, 0xc00676a750, 0x35, 0x8b, 0x4bcac01, 0xc002d9578c, 0xc0054ed390, 0x4bf5400, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/page__per_output.go:376 +0xe8
github.com/gohugoio/hugo/hugolib.(*pageContentOutput).renderContent(0xc002d956c0, 0xc00676a750, 0x35, 0x8b, 0xc0026c5f01, 0x0, 0x5e98a00, 0xc00285b790, 0x4a)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/page__per_output.go:371 +0x71
github.com/gohugoio/hugo/hugolib.newPageContentOutput.func1(0x0, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/page__per_output.go:126 +0xaab
github.com/gohugoio/hugo/hugolib.newPageContentOutput.func3(0x40c6d52, 0x6c04c00, 0x571abe0, 0xc0054ed8e8)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/page__per_output.go:210 +0x26
github.com/gohugoio/hugo/lazy.(*Init).Do.func1()
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/lazy/init.go:97 +0x136
github.com/gohugoio/hugo/lazy.(*onceMore).Do(0xc002ea40e8, 0xc0054ed8a0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/lazy/once.go:53 +0xdb
github.com/gohugoio/hugo/lazy.(*Init).Do(0xc002ea40c0, 0x20, 0x18, 0xc00626ed80, 0x4047ca3)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/lazy/init.go:79 +0x5b
github.com/gohugoio/hugo/hugolib.(*Site).initInit(0xc00088a6c0, 0xc002ea40c0, 0x5ea1c40, 0xc0030374d0, 0x7a01c28)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/site.go:209 +0x2f
github.com/gohugoio/hugo/hugolib.(*pageContentOutput).Summary(0xc002d956c0, 0xc0054eda78, 0x40c3b91)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/page__per_output.go:323 +0x5a
reflect.Value.call(0x58fa180, 0xc0030374d0, 0x1a213, 0x5900c6d, 0x4, 0x6c3d320, 0x0, 0x0, 0x56803a0, 0x0, ...)
        /usr/local/Cellar/go/1.14.2/libexec/src/reflect/value.go:460 +0x8ab
reflect.Value.Call(0x58fa180, 0xc0030374d0, 0x1a213, 0x6c3d320, 0x0, 0x0, 0x55a2220, 0xc0054edc98, 0xc0054edc98)
        /usr/local/Cellar/go/1.14.2/libexec/src/reflect/value.go:321 +0xb4
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.safeCall(0x58fa180, 0xc0030374d0, 0x1a213, 0x6c3d320, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/funcs.go:352 +0xbd
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCall(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0x58fa180, 0xc0030374d0, 0x1a213, 0x5eb6580, 0xc000ad4780, 0xc00028644d, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:297 +0x60f
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalField(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0xc00028644d, 0x7, 0x5eb6580, 0xc000ad4780, 0xc0054ee208, 0x1, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:172 +0x5fc
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalFieldChain(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0x58e5580, 0xc01568a428, 0x94, 0x5eb6580, 0xc000ad4780, 0xc000ada0c0, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:558 +0x220
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalFieldNode(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0xc000ad4780, 0xc0054ee208, 0x1, 0x1, 0x5694880, 0x6c3d320, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:522 +0x113
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalArg(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0x5eccc00, 0x564a400, 0x5eb6580, 0xc000ad4780, 0x98, 0x0, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:791 +0xd2c
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCall(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0x56744c0, 0xc000513f90, 0x13, 0x5eb6500, 0xc000ad4720, 0xc000286445, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:265 +0x2b7
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalFunction(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0xc000ad4750, 0x5eb6500, 0xc000ad4720, 0xc000ab7ec0, 0x3, 0x4, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:130 +0x16d
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCommand(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0xc000ad4720, 0x5694880, 0x6c3d320, 0x99, 0xc0054ee670, 0x4a38814, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:465 +0x58b
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalPipeline(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0xc000ad0c00, 0x0, 0x0, 0x98)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:434 +0x11a
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0x5eb6400, 0xc000ad47b0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:258 +0x396
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054eea18, 0x58e5580, 0xc01568a428, 0x94, 0x5eb6640, 0xc000ad4270)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x129
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc0054eea18, 0x13, 0x58fa180, 0xc00291d890, 0x16, 0xc000ad0a20, 0xc000ad4270, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:294 +0x158
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054eea18, 0x58fa180, 0xc00291d890, 0x16, 0x5eb6880, 0xc000ab7f00)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:277 +0x312
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054eea18, 0x58fa180, 0xc00291d890, 0x16, 0x5eb6640, 0xc000ad41b0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x129
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*Template).executeWithState(0xc000ab7d40, 0xc0054eea18, 0x58fa180, 0xc00291d890, 0x16, 0x0, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:93 +0xb7
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*executer).Execute(0xc00011a780, 0xf644030, 0xc000227680, 0x5e867a0, 0xc0054c5bc0, 0x58fa180, 0xc00291d890, 0xc00050da40, 0xc00b83bc60)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:79 +0x1e7
github.com/gohugoio/hugo/tpl/tplimpl.(*templateExec).Execute(0xc000ae35f0, 0x5e98c80, 0xc000227680, 0x5e867a0, 0xc0054c5bc0, 0x58fa180, 0xc00291d890, 0x0, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/tplimpl/template.go:233 +0x15f
github.com/gohugoio/hugo/tpl/partials.(*Namespace).Include(0xc000513a90, 0xc00059036f, 0x10, 0xc01568c040, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/partials/partials.go:142 +0x24e
reflect.Value.call(0x5675420, 0xc000513ab0, 0x13, 0x5900c6d, 0x4, 0xc0156887b0, 0x2, 0x2, 0xc00291d890, 0x16, ...)
        /usr/local/Cellar/go/1.14.2/libexec/src/reflect/value.go:460 +0x8ab
reflect.Value.Call(0x5675420, 0xc000513ab0, 0x13, 0xc0156887b0, 0x2, 0x2, 0xc0009639e0, 0xc0009358e0, 0xc0054ef038)
        /usr/local/Cellar/go/1.14.2/libexec/src/reflect/value.go:321 +0xb4
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.safeCall(0x5675420, 0xc000513ab0, 0x13, 0xc0156887b0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/funcs.go:352 +0xbd
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCall(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0x5675420, 0xc000513ab0, 0x13, 0x5eb6500, 0xc000963a70, 0xc000590366, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:297 +0x60f
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalFunction(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0xc000963aa0, 0x5eb6500, 0xc000963a70, 0xc000a048c0, 0x3, 0x4, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:130 +0x16d
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCommand(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0xc000963a70, 0x5694880, 0x6c3d320, 0x99, 0xc0054ef478, 0x4a3463b, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:465 +0x58b
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalPipeline(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0xc00095cfc0, 0x0, 0x0, 0x58fa180)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:434 +0x11a
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0x5eb6400, 0xc000963ad0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:258 +0x396
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0x5eb6640, 0xc000963a10)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x129
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc0054ef7f0, 0xa, 0x58fa180, 0xc00291d890, 0x16, 0xc00095cf60, 0xc000963a10, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:296 +0x1d0
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0x5eb6600, 0xc000a04940)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x28e
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0x5eb6640, 0xc000573890)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x129
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*Template).executeWithState(0xc000569e40, 0xc0054ef7f0, 0x58fa180, 0xc00291d890, 0x16, 0x0, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:93 +0xb7
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*executer).Execute(0xc00011a780, 0xf644030, 0xc00038f770, 0x5e867a0, 0xc00ab5b920, 0x58fa180, 0xc00291d890, 0x58feb75, 0x1)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:79 +0x1e7
github.com/gohugoio/hugo/tpl/tplimpl.(*templateExec).Execute(0xc000ae35f0, 0x5e98c80, 0xc00038f770, 0x5e867a0, 0xc00ab5b920, 0x58fa180, 0xc00291d890, 0x0, 0x0)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/tpl/tplimpl/template.go:233 +0x15f
github.com/gohugoio/hugo/hugolib.(*Site).renderForTemplate(0xc00088a6c0, 0x5902389, 0x4, 0x5900e41, 0x4, 0x58fa180, 0xc00291d890, 0x5e867a0, 0xc00ab5b920, 0x5e98c80, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/site.go:1669 +0x96
github.com/gohugoio/hugo/hugolib.(*Site).renderAndWritePage(0xc00088a6c0, 0xc0007e9aa0, 0xc0054eff00, 0x1c, 0xc00555afc0, 0x35, 0xc00291d890, 0x5e98c80, 0xc00038f770, 0x0, ...)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/site.go:1596 +0x1d2
github.com/gohugoio/hugo/hugolib.pageRenderer(0xc0021bd7e0, 0xc00088a6c0, 0xc006238900, 0xc00094e2a0, 0xc00622cd90)
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/site_render.go:139 +0x2a5
created by github.com/gohugoio/hugo/hugolib.(*Site).renderPages
        /private/tmp/hugo-20200410-7236-15a1f21/hugo-0.69.0/src/github.com/gohugoio/hugo/hugolib/site_render.go:74 +0x160
WARN 2020/04/14 09:53:53 Page.RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like: 
    {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}
Built in 1019 ms
Error: Error building site: "/Users/jwright/src/journal/content/post/team/jwright/test_post_bug.md:1:1": [BUG] goldmark: runtime error: index out of range [4] with length 4: create an issue on GitHub attaching the file in: /Users/jwright/src/tmp/hugo_bugs/goldmark_73a80b32c2e375f8aff4b771c3a6b9de.txt
  1. Did you confirm your output is different from CommonMark online demo or other official renderer correspond with an extension?:

Yes, the online demo worked fine.