Implement source block results

To support code block directives like :exports none we need context - i.e. we
need to have the block and it's results at once and can't just render them
independently.
This commit is contained in:
Niklas Fasching 2020-04-17 14:53:46 +02:00
parent f6f4646d45
commit cd923ba41a
4 changed files with 31 additions and 5 deletions

View file

@ -134,6 +134,10 @@ func (w *HTMLWriter) WriteBlock(b Block) {
w.WriteString(fmt.Sprintf(`<div class="%s-block">`, strings.ToLower(b.Name)) + "\n")
w.WriteString(content + "</div>\n")
}
if b.Result != nil {
WriteNodes(w, b.Result)
}
}
func (w *HTMLWriter) WriteResult(r Result) { WriteNodes(w, r.Node) }