Bug 797425 - Strange color of [swift-hash]
Summary: Strange color of [swift-hash]
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinx
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Alexandre Salim
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-25 19:02 UTC by Pete Zaitcev
Modified: 2012-02-27 03:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-27 03:14:15 UTC
Type: ---


Attachments (Terms of Use)

Description Pete Zaitcev 2012-02-25 19:02:52 UTC
Description of problem:

A document in openstack-swift has strange coloring in "[swift-hash]".

Version-Release number of selected component (if applicable):

python-sphinx-1.0.7-2.fc15

How reproducible:

Synchronous

Steps to Reproduce:
1. unpack the openstack-swift RPM (rpm -i && rpmbuild -bp), or
   git pull git://github.com/openstack/swift.git
2. cd $topdir
3. python setup.py build_sphinx
4. firefox  file://$topdir/doc/build/html/development_saio.html
  
Actual results:

[swift-hash] is colored strangely

Expected results:

[swift-hash] is not colored or colored uniformly

Additional info:

Apparently other implementations or reST (not Sphinx) process this
document without extra coloring.

Comment 1 Ziga Seilnacht 2012-02-27 01:37:58 UTC
Try setting `highlight_language = console` in `conf.py`. Sphinx by default first tries to parse all code blocks as python, where `hash` is a built in function.

Comment 2 Ziga Seilnacht 2012-02-27 01:52:22 UTC
Or maybe more appropriately for your example, you can use:

#. Create `/etc/swift/swift.conf`:

.. code-block:: ini

        [swift-hash]
        # random unique string that can never change (DO NOT LOSE)
        swift_hash_path_suffix = changeme


See http://sphinx.pocoo.org/markup/code.html for more details.

Comment 3 Pete Zaitcev 2012-02-27 03:14:15 UTC
Indeed, sorry for the noise, and thanks for the example. I'm closing this.


Note You need to log in before you can comment on or make changes to this bug.