Add support for timestamps

This commit is contained in:
Niklas Fasching 2019-01-06 20:50:10 +01:00
parent bd33e8885e
commit 63fef04fb3
9 changed files with 121 additions and 1 deletions

View file

@ -278,6 +278,19 @@ func (w *OrgWriter) WriteExplicitLineBreak(l ExplicitLineBreak) {
w.WriteString(`\\` + "\n" + w.indent)
}
func (w *OrgWriter) WriteTimestamp(t Timestamp) {
w.WriteString("<")
if t.IsDate {
w.WriteString(t.Time.Format(datestampFormat))
} else {
w.WriteString(t.Time.Format(timestampFormat))
}
if t.Interval != "" {
w.WriteString(" " + t.Interval)
}
w.WriteString(">")
}
func (w *OrgWriter) WriteFootnoteLink(l FootnoteLink) {
w.WriteString("[fn:" + l.Name)
if l.Definition != nil {