Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use short token for code highlighting
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #5349
stephenfin committed Oct 24, 2018
1 parent bf717c2 commit 32922c5
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/content/en/content-management/formats.md
Original file line number Diff line number Diff line change
@@ -205,7 +205,7 @@ Hugo passes reasonable default arguments to these external helpers by default:

- `asciidoc`: `--no-header-footer --safe -`
- `asciidoctor`: `--no-header-footer --safe --trace -`
- `rst2html`: `--leave-comments --initial-header-level=2`
- `rst2html`: `--leave-comments --initial-header-level=2 --syntax-highlight=short`
- `pandoc`: `--mathjax`

{{% warning "Performance of External Helpers" %}}
4 changes: 2 additions & 2 deletions helpers/content.go
Original file line number Diff line number Diff line change
@@ -695,10 +695,10 @@ func getRstContent(ctx *RenderingContext) []byte {
// handle Windows manually because it doesn't do shebangs
if runtime.GOOS == "windows" {
python := getPythonExecPath()
args := []string{path, "--leave-comments", "--initial-header-level=2"}
args := []string{path, "--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
result = externallyRenderContent(ctx, python, args)
} else {
args := []string{"--leave-comments", "--initial-header-level=2"}
args := []string{"--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
result = externallyRenderContent(ctx, path, args)
}
// TODO(bep) check if rst2html has a body only option.

0 comments on commit 32922c5

Please sign in to comment.