Hello,

Testing the :start-after: option for the literalinclude sphinx
directive does not yield the expected result with sphinx 0.6.4 and
0.6.3. It does not work neither with my current document in latex nor
with a pristine documentation project in html. Here is the file *titi*,
I would like to include it from the pattern "33"::

 11
 22
 33
 44
 55


Here is a snippet of the index.rst::

 Welcome to toto's documentation!
 ================================

 foo

 .. literalinclude:: titi
    :language: c
    :start-after: "3"

 bar


Which produces the following output in html (same behavior with
single or double quotes)::

 <h1>Welcome to toto&#8217;s documentation! [ ... ] </h1>
 <p>foo</p>
 <div class="highlight-c"><div class="highlight"><pre>
 </pre></div></div>
 <p>bar</p>


In the "pre" element, there is only a linefeed while I was
expecting this snippet::

 <h1>Welcome to toto&#8217;s documentation! [ ... ]</h1>
 <p>foo</p>
 <div class="highlight-c"><div class="highlight"><pre><span class="mi">
 <span class="mi">44</span>
 <span class="mi">55</span>
 </pre></div>
 </div>
 <p>bar</p>


I have tried to change the value for the option :start-after:
from "3" to 3 but this crashes sphinx with an exception in
.../directives/code.py::

  line 160, in run
      elif use and endbefore in line:
  TypeError: 'in <string>' requires string as left operand


Question 1: did I miss something or is there a workaround?

If it is a bug, there is no report in the tracker about this
issue: question 2, Should I file a bug report?

Thanks in advance,

PS: the doc for start-after and end-before is at
http://sphinx.pocoo.org/markup/code.html#includes, also there is a
resolved issue filed against start-after and end-before at
http://bitbucket.org/birkenfeld/sphinx/issue/78/add-start-after-and-end-before-fields-to.



-- 
I pledge allegiance to the can
of the perfect food that is tuna
and to the fishy, for which it cans,
one portion just for me, with olive oil and crackers  on top

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to