"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "markup/rst/convert.go" between
hugo-0.80.0.tar.gz and hugo-0.81.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

convert.go  (hugo-0.80.0):convert.go  (hugo-0.81.0)
skipping to change at line 69 skipping to change at line 69
// to convert reStructuredText content to HTML. // to convert reStructuredText content to HTML.
func (c *rstConverter) getRstContent(src []byte, ctx converter.DocumentContext) []byte { func (c *rstConverter) getRstContent(src []byte, ctx converter.DocumentContext) []byte {
logger := c.cfg.Logger logger := c.cfg.Logger
path := getRstExecPath() path := getRstExecPath()
if path == "" { if path == "" {
logger.Println("rst2html / rst2html.py not found in $PATH: Please install.\n", logger.Println("rst2html / rst2html.py not found in $PATH: Please install.\n",
" Leaving reStructuredText content unrend ered.") " Leaving reStructuredText content unrend ered.")
return src return src
} }
logger.Println("Rendering", ctx.DocumentName, "with", path, "...")
logger.Infoln("Rendering", ctx.DocumentName, "with", path, "...")
var result []byte var result []byte
// certain *nix based OSs wrap executables in scripted launchers // certain *nix based OSs wrap executables in scripted launchers
// invoking binaries on these OSs via python interpreter causes SyntaxErr or // invoking binaries on these OSs via python interpreter causes SyntaxErr or
// invoke directly so that shebangs work as expected // invoke directly so that shebangs work as expected
// 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" {
python := internal.GetPythonExecPath() python := internal.GetPythonExecPath()
args := []string{path, "--leave-comments", "--initial-header-leve l=2"} args := []string{path, "--leave-comments", "--initial-header-leve l=2"}
result = internal.ExternallyRenderContent(c.cfg, ctx, src, python , args) result = internal.ExternallyRenderContent(c.cfg, ctx, src, python , args)
} else { } else {
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)