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:
parent
f6f4646d45
commit
cd923ba41a
4 changed files with 31 additions and 5 deletions
|
@ -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) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue