Issues

Issue #533 wontfix

Duplicate links in literal blocks causes crash

hoytak
created an issue

Hello,

The following block of code crashes sphinx 1.0.4:

{{{ Publications ============

| Hoyt Koepke. Paper 1. | [pdf <_static/paper-1.pdf>_ ]

Hoyt Koepke. Paper 2.
}}}

While duplicating the link names may be questionable, sphinx crashes with the following backtrace:

{{{

Sphinx version: 1.0.4

Docutils version: 0.6 release

Jinja2 version: 2.2.1

Traceback (most recent call last): File "/usr/local2/lib/python2.6/site-packages/Sphinx-1.0.4-py2.6.egg/sphinx/cmdline.py", line 173, in main app.build(force_all, filenames) File "/usr/local2/lib/python2.6/site-packages/Sphinx-1.0.4-py2.6.egg/sphinx/application.py", line 207, in build self.builder.build_update() File "/usr/local2/lib/python2.6/site-packages/Sphinx-1.0.4-py2.6.egg/sphinx/builders/init.py", line 198, in build_update 'out of date' % len(to_build)) File "/usr/local2/lib/python2.6/site-packages/Sphinx-1.0.4-py2.6.egg/sphinx/builders/init.py", line 218, in build purple, length): File "/usr/local2/lib/python2.6/site-packages/Sphinx-1.0.4-py2.6.egg/sphinx/builders/init.py", line 120, in status_iterator for item in iterable: File "/usr/local2/lib/python2.6/site-packages/Sphinx-1.0.4-py2.6.egg/sphinx/environment.py", line 515, in update_generator self.read_doc(docname, app=app) File "/usr/local2/lib/python2.6/site-packages/Sphinx-1.0.4-py2.6.egg/sphinx/environment.py", line 655, in read_doc pub.publish() File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/core.py", line 203, in publish self.settings) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/readers/init.py", line 69, in read self.parse() File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/readers/init.py", line 75, in parse self.parser.parse(self.input, document) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/init.py", line 157, in parse self.statemachine.run(inputlines, document, inliner=self.inliner) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 170, in run input_source=document['source']) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 233, in run context, state, transitions) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 421, in check_line return method(match, context, next_state) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 2678, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 323, in section self.new_subsection(title, lineno, messages) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 391, in new_subsection node=section_node, match_titles=1) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 278, in nested_parse node=node, match_titles=match_titles) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 233, in run context, state, transitions) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py", line 421, in check_line return method(match, context, next_state) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 1539, in line_block self.nest_line_block_lines(block) File "/usr/local2/lib/python2.6/site-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py", line 1556, in nest_line_block_lines if block[index].indent is None: AttributeError: 'system_message' object has no attribute 'indent' }}}

Thanks! --Hoyt

Comments (4)

  1. Michele Lacchia

    Hi! When I duplicate link names I get this:

    pypol_/doc/roots.rst:13: (WARNING/2) Duplicate explicit target name: "wikipedia".
    
    pypol_/doc/roots.rst:13: (WARNING/2) Duplicate explicit target name: "mathworld".
    
    pypol_/doc/roots.rst:13: (WARNING/2) Duplicate explicit target name: "wikipedia".
    

    and I can't add an underscore to every link! I have about 20 link! Can I disable the warning?

  2. Log in to comment