Use Node.ID for anchor ID

Fixes #2057
This commit is contained in:
Bjørn Erik Pedersen
2016-04-11 13:17:25 +02:00
parent 5ef52294f9
commit cd558958a0
11 changed files with 96 additions and 45 deletions

View File

@@ -265,7 +265,7 @@ func (p *Page) renderBytes(content []byte) []byte {
}
return helpers.RenderBytes(
&helpers.RenderingContext{Content: content, PageFmt: p.determineMarkupType(),
DocumentID: p.UniqueID(), Config: p.getRenderingConfig(), LinkResolver: fn, FileResolver: fileFn})
DocumentID: p.ID(), Config: p.getRenderingConfig(), LinkResolver: fn, FileResolver: fileFn})
}
func (p *Page) renderContent(content []byte) []byte {
@@ -280,7 +280,7 @@ func (p *Page) renderContent(content []byte) []byte {
}
}
return helpers.RenderBytesWithTOC(&helpers.RenderingContext{Content: content, PageFmt: p.determineMarkupType(),
DocumentID: p.UniqueID(), Config: p.getRenderingConfig(), LinkResolver: fn, FileResolver: fileFn})
DocumentID: p.ID(), Config: p.getRenderingConfig(), LinkResolver: fn, FileResolver: fileFn})
}
func (p *Page) getRenderingConfig() *helpers.Blackfriday {