Skip to content

Commit 8036447

Browse files
committed
Use short token for code highlighting
Signed-off-by: Stephen Finucane <stephen@that.guru> Closes: #5349
1 parent 908692f commit 8036447

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎docs/content/en/content-management/formats.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Hugo passes reasonable default arguments to these external helpers by default:
217217

218218
- `asciidoc`: `--no-header-footer --safe -`
219219
- `asciidoctor`: `--no-header-footer --safe --trace -`
220-
- `rst2html`: `--leave-comments --initial-header-level=2`
220+
- `rst2html`: `--leave-comments --initial-header-level=2 --syntax-highlight=short`
221221
- `pandoc`: `--mathjax`
222222

223223
{{% warning "Performance of External Helpers" %}}

‎helpers/content.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,10 @@ func getRstContent(ctx *RenderingContext) []byte {
695695
// handle Windows manually because it doesn't do shebangs
696696
if runtime.GOOS == "windows" {
697697
python := getPythonExecPath()
698-
args := []string{path, "--leave-comments", "--initial-header-level=2"}
698+
args := []string{path, "--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
699699
result = externallyRenderContent(ctx, python, args)
700700
} else {
701-
args := []string{"--leave-comments", "--initial-header-level=2"}
701+
args := []string{"--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
702702
result = externallyRenderContent(ctx, path, args)
703703
}
704704
// TODO(bep) check if rst2html has a body only option.

0 commit comments

Comments
 (0)