commands: Validate style argument passed to gen chromastyles

Closes #13357
This commit is contained in:
Joe Mooring 2025-02-07 09:36:29 -08:00 committed by Bjørn Erik Pedersen
parent 1dd27be81a
commit a352e69b02
2 changed files with 8 additions and 1 deletions

View file

@ -11,4 +11,6 @@ hugo gen man --dir manpages
hugo gen chromastyles -h
stdout 'Generate CSS stylesheet for the Chroma code highlighter'
hugo gen chromastyles --style monokai
stdout '/\* LineHighlight \*/ \.chroma \.hl \{ background-color:#3c3d38 \}'
stdout 'Generated using: hugo gen chromastyles --style monokai'
! hugo gen chromastyles --style __invalid_style__
stderr 'invalid style: __invalid_style__'