Highlight shortcode: line numbers stop at 30

Hi - I am using the highlight shortcode with line numbering enabled. However, the line numbering stops at 30 (see attached screenshot).
Hugo v0.110.0
In my markdown file:

{{< highlight yaml "linenos=table" >}}
version: v1
kind: kubernetes
application: potato-facts
targets:
  staging:
    account: sample-cluster
    namespace: potato-facts-staging
    strategy: rolling
  prod:
    account: sample-cluster
    namespace: potato-facts-prod
    strategy: rolling
    constraints:
      dependsOn: ["staging"]
manifests:
  - path: manifests/potato-facts-v1.yaml
  - path: manifests/potato-facts-service.yaml
  - path: manifests/staging-namespace.yaml
    targets: ["staging"]
  - path: manifests/prod-namespace.yaml
    targets: ["prod"]
strategies:
  rolling:
    canary:
      steps:
        - setWeight:
            weight: 100
trafficManagement:
  kubernetes:
    - activeService: potato-facts-svc
{{< / highlight >}}

config.toml

# code highlighting
[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true
  [markup.highlight]
     guessSyntax = false
     style = 'tango'
     tabWidth = 2

Is this a bug in the shortcode or do I have something misconfigured?

Thanks.

This is a CSS issue: the line numbers have a different line height than the code.

If you can’t find the CSS conflict, consider using inline line numbers:

[markup.highlight]
style = 'tango'
lineNos = 'inline'

That might fix the problem… depends on the CSS.

Detailed explanation here.

Thanks for the quick reply. Ooops for not counting the lines.
I’m using the Docsy theme, which is built on top of Bootstrap. So it looks like I should dig into Height mismatch of highlighted line number in syntax highlighting - #15 by jmooring

The thread you reference is probably not worth your time. Take a look at the article I referenced in my last response.

1 Like

I cannot reproduce the issue when I clone the Docsy example site.
https://www.docsy.dev/docs/get-started/docsy-as-module/example-site-as-template/

image

So you’ve got something different.

Thanks for pointing me in the right direction. I’ve now got a front end developer helping me track this down.

I am on Docsy 0.7.1, same version I’m assuming at the Docsy example site you cloned. I’ll ask in the Docsy discussion if we can’t track down what’s going on.