I'm a little confused. When I put double-quotes and
less-than and greater-than symbols in my doc strings,
it usually looks fine in the output (the source HTML
shows the proper escapes). However, when I have
double-quotes and such within a single-quoted example
section, they're getting some extra escaping done,
which causes the output to look garbled.
For example, if my doc string says:
"""Here is an example. 'This example has "quotes".'"""
It would show up something like this:
Here is an example. <code>This example has
&amp;quot;quotes&amp;quot;.</code>
When I want it to look like this:
Here is an example. <code>This example has
&quot;quotes&quot;.</code>
(Hoping the HTML turned out ok.)
Why the extra & amp ; stuff?
Logged In: YES
user_id=442950
Well, ok, none of the HTML worked (I didn't realize this
was plain text), but hopefully you get the idea...
Logged In: YES
user_id=34486
Could you attach a short file with example docstrings? If you could
provide one that does what you expect and one that does not seem to work,
I'll see what's up.
Doug
Example docstrings & output
Logged In: YES
user_id=442950
Hopefully this is more helpful. :) In the zip file are:
1) testdoc.py - has docstrings with quotes and less
than/greater than operators, both regularly and in examples
(defined as being within single quotes).
2) testdoc.py.html - what HappyDoc outputs.
3) testdoc-corrected.py.html - what I think HappyDoc should
output.
Logged In: YES
user_id=34486
I've just checked in a change to the structured text
docstring parser
(happydoclib/docstring/docstring_StructuredText.py) that
should resolved this problem.