Skip to content

Commit 37685f7

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

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
@@ -49,7 +49,7 @@ Hugo passes reasonable default arguments to these external helpers by default:
4949

5050
- `asciidoc`: `--no-header-footer --safe -`
5151
- `asciidoctor`: `--no-header-footer --safe --trace -`
52-
- `rst2html`: `--leave-comments --initial-header-level=2`
52+
- `rst2html`: `--leave-comments --initial-header-level=2 --syntax-highlight=short`
5353
- `pandoc`: `--mathjax`
5454

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

‎markup/rst/convert.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ func (c *rstConverter) getRstContent(src []byte, ctx converter.DocumentContext)
7272
// handle Windows manually because it doesn't do shebangs
7373
if runtime.GOOS == "windows" {
7474
python := internal.GetPythonExecPath()
75-
args := []string{path, "--leave-comments", "--initial-header-level=2"}
75+
args := []string{path, "--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
7676
result = internal.ExternallyRenderContent(c.cfg, ctx, src, python, args)
7777
} else {
78-
args := []string{"--leave-comments", "--initial-header-level=2"}
78+
args := []string{"--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
7979
result = internal.ExternallyRenderContent(c.cfg, ctx, src, path, args)
8080
}
8181
// TODO(bep) check if rst2html has a body only option.

0 commit comments

Comments
 (0)