pygments / pygments/pygments

RTF formatter does not set background color from style

Open
#1,208 5 comments 0 reactions 1 assignee View on GitHub

@Anteru is already working on this.

Since Jan 26, 2020.

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

Description

(Original issue 1504 created by dansimau on 2019-04-09T08:32:41.068432+00:00)

When running pygmentize with RTF output and a theme with a background color, I expect the RTF output to have the background color matching the theme.

However, the RTF output does not have any background color set, e.g.:

$ cat /tmp/test
test() {
    echo "This is a test"
}
$ cat /tmp/test | pygmentize -f rtf -O style=solarizeddark -l shell |grep "This is a test"
    }{\cf8 echo}{\cf1  }{\cf10 "This is a test"}{\cf1 \par
$ 

What I am expecting is the RTF output to have the background color set using the \cbN control word.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.