Hide Forgot
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.
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.
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.
Indeed, sorry for the noise, and thanks for the example. I'm closing this.