Line numbers don't show up in code blocks
gsingh93 opened this issue · 5 comments
If I enable linenos
for a code block, the line numbers don't show up:
```c {linenos=true,hl_lines=[1,"3-4"]}
int main() {
int a;
int b;
int c;
}
```
Checking the HTML shows that they're there, but the color matches the background. I tested with the "friendly" and "monokai" themes.
Only somewhat related, but I think there are extra borders being generated with linenos=true
that don't look good by default, would be nice to have better styling here.
Thank you for the explanation as I have not tested this before so I don't know if the number is not working.
I'll solve this when I have time.
Interestingly, line numbers show up with this configuration in
config.toml
:[markup.highlight] noClasses = false
And then generating the styles with
hugo gen chromastyles
. But it still doesn't look great, could use some improved styling:
If markup.highlight.noClasses=false
is used in the site configuration, a stylesheet is required. However, there is a problem with the base style, so the provided stylesheet does not work.
The branch feat-experimental-config contains the latest fix, but it still need some tests to be merged into main.
the change has been merged.