trentm / trentm/python-markdown2

Pygments option passing is not documented?

Open
#180 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.8k
Forks
459
Avg merge
2d 19h
Merged PRs (30d)
4

Description

If I want to display line numbers with fenced code blocks, I can call markdown like this:

my_extras = {
    'fenced-code-blocks': {'linenos': True}
}
markdown2.markdown_path('./test.md', extras=my_extras)

in which I pass linenos=True to the Pygments HTML formatter.

It seems that this Pygments option passing is not documented in the "extras" wiki page. Users may have to read the source code to figure out how to do this.

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 "extras" wiki page and compare its Pygments-related documentation with the option-passing example in the issue. Document how fenced code blocks pass formatter options such as linenos=True, and consider the work done when users no longer need to inspect the source to find this usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.