#97 ``inline literal text`` creates span class pre for each word

closed-fixed
nobody
None
5
2009-09-07
2008-04-09
No

One of the principals of Plone has voiced concerns about some aspects of docutils reStructuredText to HTML rendering.

http://article.gmane.org/gmane.comp.web.zope.plone.documentation/1498
http://plope.com/Members/chrism/why_rst#comments #3

The particular instance cited:

``inline literal text``

generates:

<div class="document">
<p><tt class="docutils literal"><span class="pre">inline</span> <span class="pre">literal</span> <span class="pre">text</span></tt></p>
</div>

$ rst2html.py -V
rst2html.py (Docutils 0.4 [release])

This is only one example, but it would be good if the Plone community and others could identify examples of HTML rendering that should be changed.

Discussion

  • Jeff Kowalczyk

    Jeff Kowalczyk - 2008-04-09

    one line example of inline literal text reStructuredText

     
  • Tommi Virtanen

    Tommi Virtanen - 2008-08-09

    Logged In: YES
    user_id=203
    Originator: NO

    Not only that, it actually makes it legal for XML to eat away the spaces between the words:

    $ echo '``quux thud`` is confusing'|rst2html|grep 'quux'
    <p><tt class="docutils literal"><span class="pre">quux</span> <span class="pre">thud</span></tt> is confusing</p>
    $ echo '``quux thud`` is confusing'|rst2html|xmllint --format -|grep quux
    <p><tt class="docutils literal"><span class="pre">quux</span><span class="pre">thud</span></tt> is confusing</p>

    And *this* is what makes this bug serious and not just a minor ugliness.

     
  • Günter Milde

    Günter Milde - 2009-09-07

    test cases for inline literal wrapping

     
  • Günter Milde

    Günter Milde - 2009-09-07

    The SVN version now inserts these spans only when needed to protect text like "--an-option" and the regular expression
    ``[+]?(\d+(\.\d*)?|\.\d+)`` from bad line wrapping.

     
  • Günter Milde

    Günter Milde - 2009-09-07
    • status: open --> open-fixed
     
  • Günter Milde

    Günter Milde - 2009-09-07
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks