mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-12 04:24:13 +00:00
Merge 9cfdd9ccc0
into 74ce5dc841
This commit is contained in:
commit
2a2e1c2f4c
|
@ -42,7 +42,7 @@ tool on your machine to be able to use these formats.
|
||||||
Hugo passes reasonable default arguments to these external helpers by default:
|
Hugo passes reasonable default arguments to these external helpers by default:
|
||||||
|
|
||||||
- `asciidoctor`: `--no-header-footer -`
|
- `asciidoctor`: `--no-header-footer -`
|
||||||
- `rst2html`: `--leave-comments --initial-header-level=2`
|
- `rst2html`: `--leave-comments --initial-header-level=2 --syntax-highlight=short`
|
||||||
- `pandoc`: `--mathjax`
|
- `pandoc`: `--mathjax`
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
|
|
|
@ -81,10 +81,10 @@ func (c *rstConverter) getRstContent(src []byte, ctx converter.DocumentContext)
|
||||||
// handle Windows manually because it doesn't do shebangs
|
// handle Windows manually because it doesn't do shebangs
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
pythonBinary, _ := internal.GetPythonBinaryAndExecPath()
|
pythonBinary, _ := internal.GetPythonBinaryAndExecPath()
|
||||||
args := []string{binaryPath, "--leave-comments", "--initial-header-level=2"}
|
args := []string{binaryPath, "--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
|
||||||
result, err = internal.ExternallyRenderContent(c.cfg, ctx, src, pythonBinary, args)
|
result, err = internal.ExternallyRenderContent(c.cfg, ctx, src, pythonBinary, args)
|
||||||
} else {
|
} else {
|
||||||
args := []string{"--leave-comments", "--initial-header-level=2"}
|
args := []string{"--leave-comments", "--initial-header-level=2", "--syntax-highlight=short"}
|
||||||
result, err = internal.ExternallyRenderContent(c.cfg, ctx, src, binaryName, args)
|
result, err = internal.ExternallyRenderContent(c.cfg, ctx, src, binaryName, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue