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

crash with an empty headline #82

Closed
leenzhu opened this issue Apr 3, 2018 · 2 comments
Closed

crash with an empty headline #82

leenzhu opened this issue Apr 3, 2018 · 2 comments

Comments

@leenzhu
Copy link

leenzhu commented Apr 3, 2018

---
title: "My First Post"
date: 2018-04-03T22:00:19+08:00
draft: false
---

* Head A
*

leave the second headline empty(only has *)

hugo will crash with:


Building sites … panic: runtime error: index out of range

goroutine 55 [running]:
github.com/chaseadamsio/goorgeous.isHeadline(0xc4205e3007, 0x1, 0xff9, 0x0)
        /root/go/src/github.com/chaseadamsio/goorgeous/goorgeous.go:345 +0x74
github.com/chaseadamsio/goorgeous.OrgOptions(0xc42034f1f0, 0x9, 0x10, 0x1049fa0, 0xc42085dbc0, 0x0, 0x0, 0x0)
        /root/go/src/github.com/chaseadamsio/goorgeous/goorgeous.go:230 +0x14e4
github.com/chaseadamsio/goorgeous.Org(0xc42034f1f0, 0x9, 0x10, 0x1049fa0, 0xc42085dbc0, 0x20, 0xc42061b828, 0x0)
        /root/go/src/github.com/chaseadamsio/goorgeous/goorgeous.go:50 +0x53
github.com/gohugoio/hugo/helpers.orgRender(0xc4204d8b60, 0xc4204a72c0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x0, 0xc4204a1dd0, 0xc4204a1da0, ...)
        /root/go/src/github.com/gohugoio/hugo/helpers/content.go:705 +0x1f5
github.com/gohugoio/hugo/helpers.ContentSpec.RenderBytes(0xc4204a72c0, 0x0, 0x0, 0x0, 0x0, 0x46, 0x0, 0xc4204a1dd0, 0xc4204a1da0, 0x102bde0, ...)
        /root/go/src/github.com/gohugoio/hugo/helpers/content.go:464 +0x20a
github.com/gohugoio/hugo/hugolib.(*Page).renderContent(0xc420535900, 0xc42034f150, 0x9, 0x10, 0xc42034f150, 0x9, 0x10)
        /root/go/src/github.com/gohugoio/hugo/hugolib/page.go:742 +0x243
github.com/gohugoio/hugo/hugolib.(*contentHandlers).handlePageContent.func1(0xc420863680, 0x0, 0x0, 0x0, 0x0, 0x0)
        /root/go/src/github.com/gohugoio/hugo/hugolib/page_bundler_handlers.go:286 +0x29c
github.com/gohugoio/hugo/hugolib.(*contentHandlers).processFirstMatch.func1(0xc420863680, 0x0, 0x0, 0x0, 0x0, 0x0)
        /root/go/src/github.com/gohugoio/hugo/hugolib/page_bundler_handlers.go:84 +0xa0
github.com/gohugoio/hugo/hugolib.(*contentHandlers).parsePage.func1(0xc420863680, 0x0, 0x0, 0x0, 0x0, 0x0)
        /root/go/src/github.com/gohugoio/hugo/hugolib/page_bundler_handlers.go:262 +0x370
github.com/gohugoio/hugo/hugolib.(*contentHandlers).processFirstMatch.func1(0xc420863680, 0x0, 0x0, 0x0, 0x0, 0x0)
        /root/go/src/github.com/gohugoio/hugo/hugolib/page_bundler_handlers.go:84 +0xa0
github.com/gohugoio/hugo/hugolib.(*siteContentProcessor).readAndConvertContentFile(0xc4208689b0, 0xc420863640, 0x0, 0x0)
        /root/go/src/github.com/gohugoio/hugo/hugolib/page_bundler.go:202 +0x70
github.com/gohugoio/hugo/hugolib.(*siteContentProcessor).process.func2(0x8, 0xf03260)
        /root/go/src/github.com/gohugoio/hugo/hugolib/page_bundler.go:129 +0x139
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc420863600, 0xc42085d5c0)
        /root/go/src/golang.org/x/sync/errgroup/errgroup.go:58 +0x57
created by golang.org/x/sync/errgroup.(*Group).Go
        /root/go/src/golang.org/x/sync/errgroup/errgroup.go:55 +0x66

@leenzhu
Copy link
Author

leenzhu commented Apr 3, 2018

sorry, when i use hugo, it crash, I'm not sure whether i could fire a issue here.

@curiouslychase
Copy link
Owner

I had a branch I was getting ready to PR into Hugo this week that fixed this, but it looks like @niklasfasching PR'ed a new org parser, so I'm closing all the issues here, deprecating and archiving goorgeous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants