From 9fc45c4c39eeeeff8fe4197a6be993c88a579654 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 19 Aug 2015 18:54:33 +0900 Subject: [PATCH] Cleanup --- vimdoc.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vimdoc.go b/vimdoc.go index e3f3e8b..3799f41 100644 --- a/vimdoc.go +++ b/vimdoc.go @@ -234,8 +234,7 @@ func (v *vimDoc) Header(out *bytes.Buffer, text func() bool, level int, id strin v.headings = append(v.headings, h) tag := fmt.Sprintf("*%s*", v.buildHelpTag(h.text)) - title := fmt.Sprintf("%s", bytes.ToUpper(h.text)) - v.writeSplitText(out, []byte(title), []byte(tag), " ", 2) + v.writeSplitText(out, bytes.ToUpper(h.text), []byte(tag), " ", 2) out.WriteString("\n") } @@ -397,7 +396,9 @@ func (v *vimDoc) DocumentFooter(out *bytes.Buffer) { temp.Write(out.Bytes()[:v.tocPos]) v.writeRule(&temp, "=") - temp.WriteString("CONTENTS\n") + title := []byte("contents") + tag := fmt.Sprintf("*%s*", v.buildHelpTag(title)) + v.writeSplitText(&temp, bytes.ToUpper(title), []byte(tag), " ", 2) temp.WriteString("\n") v.writeToc(&temp) temp.WriteString("\n")