Permalink
Browse files

helpers: add --initial-header-level=2 to rst2html (#3528)

reStructuredText doesn't have explicit section levels but sets them in
the order of appearance. Since level 1 is already set from the title in
the front matter it makes more sense to start with level 2 when
converting with rst2html.
  • Loading branch information...
frankbraun authored and anthonyfok committed Jun 27, 2017
1 parent 30e14cc commit bfce30d85972c27c27e8a2caac9db6315f813298
Showing with 1 addition and 1 deletion.
  1. +1 −1 helpers/content.go
View
@@ -637,7 +637,7 @@ func getRstContent(ctx *RenderingContext) []byte {
}
jww.INFO.Println("Rendering", ctx.DocumentName, "with", path, "...")
cmd := exec.Command(python, path, "--leave-comments")
cmd := exec.Command(python, path, "--leave-comments", "--initial-header-level=2")
cmd.Stdin = bytes.NewReader(cleanContent)
var out, cmderr bytes.Buffer
cmd.Stdout = &out

2 comments on commit bfce30d

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Jun 27, 2017

Member

@anthonyfok when you do rebase merges, you have to remember to edit the commit message to get it in line with the contribution guidelines (in this case, remove or move the "(#3528)" from the title/subject).

Member

bep replied Jun 27, 2017

@anthonyfok when you do rebase merges, you have to remember to edit the commit message to get it in line with the contribution guidelines (in this case, remove or move the "(#3528)" from the title/subject).

@anthonyfok

This comment has been minimized.

Show comment
Hide comment
@anthonyfok

anthonyfok Jun 27, 2017

Contributor

Thank you for the heads up! About the "(#3528)" part, I thought it was something new from GitHub and would be nice to include in the changelog, and didn't even realize it doesn't conform with the contribution guideline! Oops! I'll make sure I remove the pull request number from the title from now on.

Contributor

anthonyfok replied Jun 27, 2017

Thank you for the heads up! About the "(#3528)" part, I thought it was something new from GitHub and would be nice to include in the changelog, and didn't even realize it doesn't conform with the contribution guideline! Oops! I'll make sure I remove the pull request number from the title from now on.

Please sign in to comment.