Codeblock problems when show linenos #922
JoJoJotarou
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Related issues:
The problem occurs when you use highlight lines !!!
The text you see in the image is what I used in Markdown!!!
I've had some tests recently.In sample config.yml:
this
is same as this.
html like:
Means the codeblock is rendered as
<table>
by default.By https://gohugo.io/functions/highlight/#options
So add
lineNumbersInTable=false
in config.yml to tell Hugo not use<table>
rendering codeblock.now, this
is same as this.
html like:
Then add this:

Final effect:
Derivative problems:
I haven't found a real solution, but it can be done:
hugo: v0.95
PaperMod(commit Id): cb9be55c78efadee651f3a9f5e9b719f28a6d290
Beta Was this translation helpful? Give feedback.
All reactions