commands: Modify gen chromastyles to output all CSS classes

Chroma was updated to include a new function to output all CSS
classes without skipping any considered redundant with the current
style.

This will modify the `hugo gen chromastyles` command to use this new
function by default, which avoids potential problems if the style is
later modified.

Also includes requires the updated Chroma (v0.7.2).

Resolves #7167
This commit is contained in:
Steve
2020-04-13 12:31:33 -04:00
committed by GitHub
parent feaa582cbe
commit 102ec2da7a
3 changed files with 4 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ func (g *genChromaStyles) generate() error {
if err != nil {
return err
}
formatter := html.New(html.WithClasses(true))
formatter := html.New(html.WithAllClasses(true))
formatter.WriteCSS(os.Stdout, style)
return nil
}