pygments / pygments/pygments

Highlighting of nested generics isn't correct

Open
#1,155 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-major T-bug X-imported
Dominant language
Python
Stars
2.2k
Forks
885
PR merge metrics
No merged PRs in 30d

Description

(Original issue 1451 created by nic0lette on 2018-06-22T18:19:17.113124+00:00)

The highlighting present in this example: http://pygments.org/demo/6751426/ isn't correct/looks off.

The initial "<" of "<T, R : Comparable>" probably shouldn't be highlighted any differently than the second or closing brackets.

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.

Research direction

Start with the Pygments demo at http://pygments.org/demo/6751426/ and inspect how the nested generic example is tokenized and rendered. Trace the relevant syntax-highlighting path for the example, then verify that the initial, inner, and closing angle brackets receive the intended consistent highlighting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.