Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown content not able to be rendered: Error: Error building site #8727

Closed
luxcgo opened this issue Jul 4, 2021 · 3 comments
Closed

markdown content not able to be rendered: Error: Error building site #8727

luxcgo opened this issue Jul 4, 2021 · 3 comments

Comments

@luxcgo
Copy link

luxcgo commented Jul 4, 2021

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.83.1+extended darwin/arm64 BuildDate=unknown

Does this issue reproduce with the latest release?

yes
below is the file that triggered the bug, I'm using typora editor
temp.txt

Start building sites …
goroutine 64 [running]:
runtime/debug.Stack(0x105f7c638, 0x106b2df00, 0x1400014a540)
	runtime/debug/stack.go:24 +0x88
github.com/gohugoio/hugo/markup/goldmark.(*goldmarkConverter).Convert.func1(0x14000a10000, 0x140004f6840, 0x20a, 0x28a, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/gohugoio/hugo/markup/goldmark/convert.go:239 +0x188
panic(0x105e1b020, 0x14000a00ab0)
	runtime/panic.go:965 +0x14c
github.com/yuin/goldmark/text.(*Segment).Value(0x14000551248, 0x140004f6840, 0x20a, 0x28a, 0x19, 0x0, 0x0)
	github.com/yuin/[email protected]/text/segment.go:48 +0x30c
github.com/yuin/goldmark-highlighting.(*HTMLRenderer).renderFencedCodeBlock(0x1400086c0e0, 0x105f74d38, 0x14000b8ea00, 0x140004f6840, 0x20a, 0x28a, 0x105f87e60, 0x140006a6000, 0x201, 0x3, ...)
	github.com/yuin/[email protected]/highlighting.go:465 +0x698
github.com/yuin/goldmark/renderer.(*renderer).Render.func2(0x105f87e60, 0x140006a6000, 0x1, 0x3, 0x0, 0x0)
	github.com/yuin/[email protected]/renderer/renderer.go:166 +0xdc
github.com/yuin/goldmark/ast.walkHelper(0x105f87e60, 0x140006a6000, 0x14000551650, 0x3, 0x0, 0x0)
	github.com/yuin/[email protected]/ast/ast.go:492 +0x40
github.com/yuin/goldmark/ast.walkHelper(0x105f88520, 0x140006a41b0, 0x14000551650, 0x3, 0x0, 0x0)
	github.com/yuin/[email protected]/ast/ast.go:498 +0x148
github.com/yuin/goldmark/ast.walkHelper(0x105f88400, 0x140006a4090, 0x14000551650, 0x3, 0x0, 0x0)
	github.com/yuin/[email protected]/ast/ast.go:498 +0x148
github.com/yuin/goldmark/ast.walkHelper(0x105f87c20, 0x140006a4000, 0x14000551650, 0x105f74d38, 0x14000b8ea00, 0x1)
	github.com/yuin/[email protected]/ast/ast.go:498 +0x148
github.com/yuin/goldmark/ast.Walk(...)
	github.com/yuin/[email protected]/ast/ast.go:487
github.com/yuin/goldmark/renderer.(*renderer).Render(0x140002971d0, 0x105f44798, 0x14000b8ea00, 0x140004f6840, 0x20a, 0x28a, 0x105f87c20, 0x140006a4000, 0x0, 0x0)
	github.com/yuin/[email protected]/renderer/renderer.go:161 +0xdc
github.com/gohugoio/hugo/markup/goldmark.(*goldmarkConverter).Convert(0x14000a10000, 0x140004f6840, 0x20a, 0x28a, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/gohugoio/hugo/markup/goldmark/convert.go:265 +0x488
github.com/gohugoio/hugo/hugolib.(*pageContentOutput).renderContentWithConverter(0x1400087c540, 0x105f565d0, 0x14000a10000, 0x140004f6840, 0x20a, 0x28a, 0x14000997a01, 0x104faa7a0, 0x1400087c614, 0x14000997a18, ...)
	github.com/gohugoio/hugo/hugolib/page__per_output.go:378 +0xa8
github.com/gohugoio/hugo/hugolib.(*pageContentOutput).renderContent(0x1400087c540, 0x140004f6840, 0x20a, 0x28a, 0x140004ee601, 0x0, 0x105f566e8, 0x1400063e270, 0x45)
	github.com/gohugoio/hugo/hugolib/page__per_output.go:374 +0x58
github.com/gohugoio/hugo/hugolib.newPageContentOutput.func1(0x0, 0x0)
	github.com/gohugoio/hugo/hugolib/page__per_output.go:126 +0x848
github.com/gohugoio/hugo/hugolib.newPageContentOutput.func2(0x105f69040, 0x14000770de0, 0x1057d7e00, 0x1, 0x1, 0x14000642600)
	github.com/gohugoio/hugo/hugolib/page__per_output.go:205 +0x28
github.com/gohugoio/hugo/lazy.(*Init).withTimeout.func1(0x1400033ba60, 0x105f69040, 0x14000770de0, 0x14000770e40)
	github.com/gohugoio/hugo/lazy/init.go:176 +0x38
created by github.com/gohugoio/hugo/lazy.(*Init).withTimeout
	github.com/gohugoio/hugo/lazy/init.go:175 +0xd0
Built in 38 ms
Error: Error building site: "/Users/lucas/Documents/blog/myhugoblog/content/posts/go test.md:1:1": [BUG] goldmark: runtime error: slice bounds out of range [343:341]: create an issue on GitHub attaching the file in: /var/folders/23/6dp1p65d3ng56j320xxr2wfh0000gn/T/hugo_bugs/goldmark_927bd71bfc7c802ffbb4d449f9e1a8b6.txt
@bep bep added this to the v0.85 milestone Jul 4, 2021
@bep
Copy link
Member

bep commented Jul 4, 2021

Thanks for the report. This looks like it could be an issue with Goldmark. Could you create an issue at https://github.com/yuin/goldmark/issues and link back to this issue so we could track it?

@luxcgo
Copy link
Author

luxcgo commented Jul 4, 2021

Thanks for your reply! I checked goldmark issues. It seems the problem is already solved in v1.3.9 release version. We only need to update it. yuin/goldmark/issues/229

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants