make classname with priority and lowercase
This commit is contained in:
parent
1dcadee27e
commit
538fa3b3c5
1 changed files with 3 additions and 3 deletions
|
@ -293,17 +293,17 @@ func (w *HTMLWriter) WriteHeadline(h Headline) {
|
||||||
w.WriteString(fmt.Sprintf(`<div id="outline-container-%s" class="outline-%d">`, h.ID(), level) + "\n")
|
w.WriteString(fmt.Sprintf(`<div id="outline-container-%s" class="outline-%d">`, h.ID(), level) + "\n")
|
||||||
w.WriteString(fmt.Sprintf(`<h%d id="%s">`, level, h.ID()) + "\n")
|
w.WriteString(fmt.Sprintf(`<h%d id="%s">`, level, h.ID()) + "\n")
|
||||||
if w.document.GetOption("todo") != "nil" && h.Status != "" {
|
if w.document.GetOption("todo") != "nil" && h.Status != "" {
|
||||||
w.WriteString(fmt.Sprintf(`<span class="todo %s">%s</span>`, h.Status, h.Status) + "\n")
|
w.WriteString(fmt.Sprintf(`<span class="todo status-%s">%s</span>`, strings.ToLower(h.Status), h.Status) + "\n")
|
||||||
}
|
}
|
||||||
if w.document.GetOption("pri") != "nil" && h.Priority != "" {
|
if w.document.GetOption("pri") != "nil" && h.Priority != "" {
|
||||||
w.WriteString(fmt.Sprintf(`<span class="priority %s">[%s]</span>`, h.Priority, h.Priority) + "\n")
|
w.WriteString(fmt.Sprintf(`<span class="priority priority-%s">[%s]</span>`, strings.ToLower(h.Priority), h.Priority) + "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteNodes(w, h.Title...)
|
WriteNodes(w, h.Title...)
|
||||||
if w.document.GetOption("tags") != "nil" && len(h.Tags) != 0 {
|
if w.document.GetOption("tags") != "nil" && len(h.Tags) != 0 {
|
||||||
tags := make([]string, len(h.Tags))
|
tags := make([]string, len(h.Tags))
|
||||||
for i, tag := range h.Tags {
|
for i, tag := range h.Tags {
|
||||||
tags[i] = fmt.Sprintf(`<span class="%s">%s</span>`, tag, tag)
|
tags[i] = fmt.Sprintf(`<span class="tag-%s">%s</span>`, strings.ToLower(tag), tag)
|
||||||
}
|
}
|
||||||
w.WriteString("   ")
|
w.WriteString("   ")
|
||||||
w.WriteString(fmt.Sprintf(`<span class="tags">%s</span>`, strings.Join(tags, " ")))
|
w.WriteString(fmt.Sprintf(`<span class="tags">%s</span>`, strings.Join(tags, " ")))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue