fix compile error from rebase and improve error handling

This commit is contained in:
Paul 2022-06-19 11:40:53 +02:00
parent f1b1e5f41b
commit aaed290b02
No known key found for this signature in database
GPG key ID: 20C692A6C6307F2E

View file

@ -57,7 +57,11 @@ type pandocConverter struct {
}
func (c *pandocConverter) Convert(ctx converter.RenderContext) (converter.Result, error) {
content, toc, err := c.extractTOC(c.getPandocContent(ctx.Src, c.ctx))
contentWithToc, err := c.getPandocContent(ctx.Src, c.ctx)
if err != nil {
return nil, err
}
content, toc, err := c.extractTOC(contentWithToc)
if err != nil {
return nil, err
}