1. PyPA
  2. Python Packaging Authority Projects
  3. pypi

Issues

Issue #116 wontfix

pypi black-on-purple syntax highlights are terrible

Mike Pennington
created an issue

Background

I have a package on pypi, which uses a README.rst to render some example code:

.. code:: python

   from ciscoconfparse import CiscoConfParse

   parse = CiscoConfParse('edge-6509.conf')

   ## Walk all interfaces, and add missing configs
   for intf in parse.find_objects(r'^interface'):

       ## Identify missing features
       has_portsecurity = bool(parse.find_parents_w_child(r'^%s$' % line,
          r'port-security'))

pypi correctly parses the restructured text, but the default black-on-purple code highlights makes it barely readable:

Problem behavior on pypi

http://i.stack.imgur.com/WM0vS.png

Black-on-purple and blue-on-purple syntax highlights are awful.

Recommendation

Please change python .. code:: python highlights from README.rst. In a perfect world, make it look like it does on on github or Stack Overflow...

Good Example: Code Highlights from github

github_nice.png

Good Example: Code highlights From Stack Overflow

good_so_codehighlighting.png

Comments (3)

  1. Log in to comment