Add Page.RawContent() to access raw Markdown as a string.

In particular, RawContent() excludes the metadata header.

This is necessary in the use case of embedding remarkjs.com slides, as it needs
the unprocessed Markdown content to generate the slides.
This commit is contained in:
Marc-Antoine Ruel authored and Bjørn Erik Pedersen committed 2015-07-02 19:24:30 +02:00
1 parent dd732e84f4
commit c9fc0e786f
1 file changed
+4
+4
View File
@@ -726,6 +726,10 @@ func (p *Page) parse(reader io.Reader) error {
return nil
}
func (p *Page) RawContent() string {
return string(p.rawContent)
}
func (p *Page) SetSourceContent(content []byte) {
p.Source.Content = content
}