Add context to asciidoc/-tor error logging

Add DocumentName (path to the file being rendered) to RenderingContext
and use that information to include the path in the error print.

See #2399
Closes #2567
This commit is contained in:
C. Hoeppler
2016-10-13 10:30:43 +02:00
committed by Bjørn Erik Pedersen
parent 9f9b93af2c
commit 766c82a6bb
3 changed files with 10 additions and 5 deletions

View File

@@ -380,7 +380,8 @@ func (p *Page) renderContent(content []byte) []byte {
return helpers.RenderBytes(&helpers.RenderingContext{
Content: content, RenderTOC: true, PageFmt: p.determineMarkupType(),
ConfigProvider: p.Language(),
DocumentID: p.UniqueID(), Config: p.getRenderingConfig(), LinkResolver: fn, FileResolver: fileFn})
DocumentID: p.UniqueID(), DocumentName: p.Path(),
Config: p.getRenderingConfig(), LinkResolver: fn, FileResolver: fileFn})
}
func (p *Page) getRenderingConfig() *helpers.Blackfriday {