Skip to content

Commit

Permalink
helpers: add --initial-header-level=2 to rst2html (#3528)
Browse files Browse the repository at this point in the history
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 bfce30d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

2 comments on commit bfce30d

@bep
Copy link
Member

@bep bep commented on bfce30d Jun 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.