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

@ -102,6 +102,11 @@ func (w *OrgWriter) WriteBlock(b Block) {
w.WriteString(w.indent)
}
w.WriteString("#+END_" + b.Name + "\n")
if b.Result != nil {
w.WriteString("\n")
WriteNodes(w, b.Result)
}
}
func (w *OrgWriter) WriteResult(r Result) {