mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-24 16:54:11 +00:00
Report error, but don’t fatally stop if pygments has error. Return original string. (+1 squashed commit)
Squashed commits: [849a7af] if highlighting doesn’t work, just return original string
This commit is contained in:
parent
3fd6c1a24e
commit
01da9a40e6
1 changed files with 20 additions and 20 deletions
|
@ -38,7 +38,7 @@ func Highlight(code string, lexer string) string {
|
||||||
|
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
log.Print(stderr.String())
|
log.Print(stderr.String())
|
||||||
log.Fatal(err)
|
return code
|
||||||
}
|
}
|
||||||
|
|
||||||
return out.String()
|
return out.String()
|
||||||
|
|
Loading…
Reference in a new issue