I recently noticed that if used tabs for escaping in highlight it was bigger than if I used spaces. I thought it might be because of the configuration. but after setting markdown highlight tabWidth to 4 it didn’t do anything. And it only works when I’m not using pygmentsUseClasses: true
First, please do not mix the old Pygments configuration options with the newer (as of Hugo v0.28) Chroma configuration options. If you want to generate classes instead of inline styles, do this:
markup:
highlight:
noClasses: false
Second, you are correct that the tabWidth
configuration option is ignored when generating classes instead of inline styles. For example, when you do this…
markup:
highlight:
noClasses: false
tabWidth: 4
…tabs will be displayed as 8 spaces. To work around this, add this to your CSS:
pre.chroma {
-moz-tab-size:4;-o-tab-size:4;tab-size:4;
}
This part of the configuration for the syntax highlighting made me believe that I had to use pygmentsUseClasses=true. Thanks for the support :))
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.