Skip to content

Commit

Permalink
present2md: fix depth count for blogs with sections
Browse files Browse the repository at this point in the history
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 <andybons@golang.org>
  • Loading branch information
rsc committed Mar 17, 2020
1 parent 4d86439 commit 2944c61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/present2md/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 2944c61

Please sign in to comment.