Handle multiple C{type} in an epytext docstring
Reading the following docstring
"""
Blah
:Parameters:
arg1 :C{string} or C{int}
Does something
"""
results in the following Google docstring
"""Blah
Args:
arg1 (string} or C{int): Does something
"""
It looks like something is greedily looking for C{} but it needs to be more conservative.
Damn, I didn't even know this was a thing we supported. I thought we only stripped backticks ` I'll do some digging.
Maybe we don't and it's a fluke that it works this way. I'm pretty sure it's made up syntax. I've never been able to find anything else using it.
I remember us talking about implementing support for it but I don't remember deciding one way or the other. I'd be happy saying we don't support it, but then it feels like we should be keeping the outer C{ and } instead of stripping it?
Hmmm I'm actually not able to reproduce this.
Here's what I get when I tested. It reads as the RestParser and writing with GoogleWriter produces:
"""Blah
Args:
arg1 (C{string} or C{int}): Does something
"""
I wonder if your version is custom and has this added as an additional feature? I vaguely remember maybe you or Andy adding this in? I wonder if we decided to not include that in the open source release?
I can't reproduce either, even on the original docstring that I saw the issue on... So I'm happy to close this
I did however find that the C{type} syntax comes from epytext (http://epydoc.sourceforge.net/manual-epytext.html#basic-inline-markup).
Huh funky. I'm cool to support converting that syntax as a feature request if you think its useful.
It's part of epytext and it's used a lot in our codebases. It would be useful for docconvert to support their conversion.
I've reopened this is as the feature request to convert I{text} to *text*, B{text} to **text**, C{type} to ``type``, and M{text} to :math:`text` .
We could also consider stripping C{} totally in type fields.
Probably way way too late for you to benefit from this, but finally added support for this