Use Chroma as new default syntax highlighter

If you want to use Pygments, set `pygmentsUseClassic=true` in your site config.

Fixes #3888
This commit is contained in:
Bjørn Erik Pedersen
2017-09-25 08:59:02 +02:00
committed by GitHub
parent 81ed564793
commit fb33d8286d
18 changed files with 652 additions and 108 deletions

13
deps/deps.go vendored
View File

@@ -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