html: Render headline priority

This commit is contained in:
Niklas Fasching 2018-12-17 22:38:59 +01:00
parent a861437185
commit 0e64f9df7f
4 changed files with 11 additions and 1 deletions

View file

@ -197,6 +197,10 @@ func (w *HTMLWriter) writeHeadline(h Headline) {
if h.Status != "" {
w.WriteString(fmt.Sprintf(`<span class="todo">%s</span>`, h.Status) + "\n")
}
if h.Priority != "" {
w.WriteString(fmt.Sprintf(`<span class="priority">%s</span>`, h.Priority) + "\n")
}
w.WriteString(title)
if len(h.Tags) != 0 {
tags := make([]string, len(h.Tags))

View file

@ -3,6 +3,7 @@ Simple Headline
</h1>
<h1>
<span class="todo">TODO</span>
<span class="priority">B</span>
Headline with todo status &amp; priority
</h1>
<h1>
@ -13,6 +14,7 @@ Headline with TODO status
the <strong>content</strong>
</p>
<h1>
<span class="priority">A</span>
Headline with tags &amp; priority&#xa0;&#xa0;&#xa0;<span class="tags"><span>foo</span>&#xa0;<span>bar</span></span>
</h1>
<p>