aboutsummaryrefslogtreecommitdiffhomepage
path: root/deps
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-09-25 08:59:02 +0200
committerGitHub <[email protected]>2017-09-25 08:59:02 +0200
commitfb33d8286d78a78a74deb44355b621852a1c4033 (patch)
treea726e33fbaa0ca7a315a2e12021306fd5b27690e /deps
parent81ed564793609a32be20a569cc15da2cc02dd734 (diff)
downloadhugo-fb33d8286d78a78a74deb44355b621852a1c4033.tar.gz
hugo-fb33d8286d78a78a74deb44355b621852a1c4033.zip
Use Chroma as new default syntax highlighter
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config. Fixes #3888
Diffstat (limited to 'deps')
-rw-r--r--deps/deps.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/deps/deps.go b/deps/deps.go
index ed073c5d3..d8ba3313e 100644
--- a/deps/deps.go
+++ b/deps/deps.go
@@ -114,6 +114,11 @@ func New(cfg DepsCfg) (*Deps, error) {
return nil, err
}
+ contentSpec, err := helpers.NewContentSpec(cfg.Language)
+ if err != nil {
+ return nil, err
+ }
+
d := &Deps{
Fs: fs,
Log: logger,
@@ -121,7 +126,7 @@ func New(cfg DepsCfg) (*Deps, error) {
translationProvider: cfg.TranslationProvider,
WithTemplate: cfg.WithTemplate,
PathSpec: ps,
- ContentSpec: helpers.NewContentSpec(cfg.Language),
+ ContentSpec: contentSpec,
Cfg: cfg.Language,
Language: cfg.Language,
}
@@ -139,7 +144,11 @@ func (d Deps) ForLanguage(l *helpers.Language) (*Deps, error) {
return nil, err
}
- d.ContentSpec = helpers.NewContentSpec(l)
+ d.ContentSpec, err = helpers.NewContentSpec(l)
+ if err != nil {
+ return nil, err
+ }
+
d.Cfg = l
d.Language = l