Line height for numbers does not match code row.

Open
#1,931 1 comment 0 reactions 1 assignee View on GitHub

@Anteru is already working on this.

Since Oct 29, 2021.

Assessment

This issue has not been assessed yet.

Description

We are using Pygments 2.10.0 with the tango theme. Our target type is html.

This is our command line

pygmentize -l %s -O style=tango,linenos=table,noclasses -f html -o %s %s

so

pygmentize -l yaml -O style=tango,linenos=table,noclasses -f html -o /tmp/result.html /tmp/source.yaml

When doing so, the resulting HTML does show different line-heights for the line-numbering compared to the code column.
The code column shows up with line-height: 125%, while the numbering line-height is normal. This said, it is all applied to the pre container

This means that code and it's line number show up shifted in it's height.

We should thus consider setting the line-height on both of the pre id the numbering and code column to the same value (either to normal or to 125%)

Dominant language
Python
Stars
2.2k
Forks
885
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pygments/pygments

All issues in pygments/pygments

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.