Ticket #10474 (new defect)
Opened 3 years ago
sphinxify() text-mode fails on definition within list item
|Reported by:||kini||Owned by:||mvngu|
|Component:||documentation||Keywords:||sagedoc, sphinxify, sphinx, restructuredtext|
As the title suggests, sage.misc.sagedoc.sphinxify(s, format="text") returns an empty string when s contains a line that begins a list item (such as "- foo", "* foo", "1. foo", etc.) immediately followed by a line with greater indentation than the first (such as " bar", " bar", and " bar" respectively). However, calling the function without the option format="text" returns (slightly broken) HTML reflecting a reasonable interpretation of the input string.
sage: sage.misc.sagedoc.sphinxify("- foo\n bar") '<div class="docstring">\n \n <ul>\n<li><dl class="first docutils">\n<dt>foo</dt>\n<dd><p class="first last">bar</p>\n</dd>\n</dl>\n</li>\n</ul>\n\n\n</div>' sage: sage.misc.sagedoc.sphinxify("- foo\n bar", format="text") ''
The above snippet is from a sage 4.6 interpreter session.
I'm not too sure, but after some digging around in sage, it *looks* like this is a sphinx issue, but I thought I should report it here first anyway, just in case...
The expected behavior, I would think, would be either for both text mode and html mode to refuse to interpret the string, or for both of them to parse it in similar ways.