Support `pygmentize -S STYLE -f your_formatter.py -x`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 885
- PR merge metrics
- No merged PRs in 30d
Description
Once I patched LaTeX package minted to support custom formatters, see https://github.com/gpoore/minted/issues/176#issuecomment-695344998. Today when I tried providing a workaround for https://github.com/gpoore/minted/issues/299 by loading a custom formatter relative to current directory, I realized then the patched minted will call pygmentize -S STYLE -f your_formatter.py -x, which is not yet supported.
Source lines handling -S STYLE,
https://github.com/pygments/pygments/blob/cfaa45dcc4103da8cf1700fd0d3e5708d894337b/pygments/cmdline.py#L216-L236
and the logic handling -f formater
https://github.com/pygments/pygments/blob/cfaa45dcc4103da8cf1700fd0d3e5708d894337b/pygments/cmdline.py#L346-L375
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pygments/cmdline.py, at the source-line handling for -S STYLE and the formatter logic linked in the issue. Trace how each option is parsed and combined, then verify that pygmentize -S STYLE -f your_formatter.py -x supports a formatter loaded relative to the current directory. Done means the command works for the custom formatter use case described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100