di · GitHub

@hugovk

This was referenced

Sep 21, 2020

Closed

Closed

di

Comment on lines +22 to +27

# To simplify syntax highlighting, all literal blocks (those produced by ::)
# in the following PEPs will be automatically highlighted using Python lexer.
# PEP editors/authors could make simple PRs extending this list.
# This will be not needed when PEPs are moved to RtD and all code blocks are
# formatted using .. code:: language.
PURE_PYTHON_PEPS = [483, 484, 526]

hugovk

Comment on lines +22 to +27

# To simplify syntax highlighting, all literal blocks (those produced by ::)
# in the following PEPs will be automatically highlighted using Python lexer.
# PEP editors/authors could make simple PRs extending this list.
# This will be not needed when PEPs are moved to RtD and all code blocks are
# formatted using .. code:: language.
PURE_PYTHON_PEPS = [483, 484, 526]
# Fix PEP links
pep_content = BeautifulSoup(data['content'], 'lxml')
body_links = pep_content.find_all("a")
# Fix highlighting code
div = pep_content.new_tag('div')
div['class'] = ['highlight']
cb.wrap(div)
# Highlight existing pure-Python PEPs
Other languages can be set like '.. code-block:: c'.

@hugovk

di

django-widget-tweaks==1.4.8
django-countries==6.1.3

pygments==2.7.3 # This will be not needed when PEPs are moved to RtD.

Comment on lines +22 to +27

# To simplify syntax highlighting, all literal blocks (those produced by ::)
# in the following PEPs will be automatically highlighted using Python lexer.
# PEP editors/authors could make simple PRs extending this list.
# This will be not needed when PEPs are moved to RtD and all code blocks are
# formatted using .. code:: language.
PURE_PYTHON_PEPS = [483, 484, 526]

@hugovk

di

di approved these changes Dec 18, 2020

@hugovk

hugovk deleted the ilevkivskyi-colour branch

March 7, 2022 20:24

Read the original on github.com ↗