Skip to content

Commit 9cfdd9c

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

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
@@ -42,7 +42,7 @@ tool on your machine to be able to use these formats.
4242
Hugo passes reasonable default arguments to these external helpers by default:
4343

4444
- `asciidoctor`: `--no-header-footer -`
45-
- `rst2html`: `--leave-comments --initial-header-level=2`
45+
- `rst2html`: `--leave-comments --initial-header-level=2 --syntax-highlight=short`
4646
- `pandoc`: `--mathjax`
4747

4848
{{% note %}}

‎markup/rst/convert.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ func (c *rstConverter) getRstContent(src []byte, ctx converter.DocumentContext)
8282
// handle Windows manually because it doesn't do shebangs
8383
if runtime.GOOS == "windows" {
8484
pythonBinary, _ := internal.GetPythonBinaryAndExecPath()
85-
args := []string{binaryPath, "--leave-comments", "--initial-header-level=2"}
85+
args := []string{binaryPath, "--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
8686
result, err = internal.ExternallyRenderContent(c.cfg, ctx, src, pythonBinary, args)
8787
} else {
88-
args := []string{"--leave-comments", "--initial-header-level=2"}
88+
args := []string{"--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
8989
result, err = internal.ExternallyRenderContent(c.cfg, ctx, src, binaryName, args)
9090
}
9191

0 commit comments

Comments
 (0)