From 2944c61d58b4b44936759b37e08703fc37be20e2 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 15 Mar 2020 16:19:31 -0400 Subject: [PATCH] present2md: fix depth count for blogs with sections Without the bug fix, you get ## followed by #### in the file. Change-Id: I6af85debf4bc84f9e346732b5641eb3a4e7d7e83 Reviewed-on: https://go-review.googlesource.com/c/tools/+/223602 Reviewed-by: Andrew Bonventre --- cmd/present2md/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/present2md/main.go b/cmd/present2md/main.go index 86c0286627c..15ee3e63b2a 100644 --- a/cmd/present2md/main.go +++ b/cmd/present2md/main.go @@ -172,7 +172,7 @@ func convert(r io.Reader, file string, writeBack bool) error { for _, s := range doc.Sections { fmt.Fprintf(&md, "\n") fmt.Fprintf(&md, "## %s\n", markdownEscape(s.Title, false)) - printSectionBody(file, 2, &md, s.Elem) + printSectionBody(file, 1, &md, s.Elem) } }