Implement inline source blocks
https://orgmode.org/manual/Structure-of-Code-Blocks.html
This commit is contained in:
parent
6ed46ba95d
commit
3018ace8d0
8 changed files with 83 additions and 21 deletions
|
@ -97,6 +97,16 @@ func (w *OrgWriter) WriteBlock(b Block) {
|
|||
w.WriteString("#+END_" + b.Name + "\n")
|
||||
}
|
||||
|
||||
func (w *OrgWriter) WriteInlineBlock(b InlineBlock) {
|
||||
w.WriteString(b.Name + "_" + b.Parameters[0])
|
||||
if len(b.Parameters) > 1 {
|
||||
w.WriteString("[" + strings.Join(b.Parameters[1:], " ") + "]")
|
||||
}
|
||||
w.WriteString("{")
|
||||
WriteNodes(w, b.Children...)
|
||||
w.WriteString("}")
|
||||
}
|
||||
|
||||
func (w *OrgWriter) WriteDrawer(d Drawer) {
|
||||
w.WriteString(w.indent + ":" + d.Name + ":\n")
|
||||
WriteNodes(w, d.Children...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue