posit-dev / positron

Positron, a next-generation data science IDE
Other
1.47k stars 43 forks source link

Python: parse documentation for Python keywords #818

Open isabelizimm opened 1 year ago

isabelizimm commented 1 year ago

When looking up keywords such as def or class, the restructured text is not parsed.

249907965-99ee2138-6c4c-4b39-a092-a6825370a74c

seeM commented 1 year ago

It looks like there isn't actually much reStructuredText syntax here. For example, here's what it looks like if we do parse it:

image

I also tried with pandoc and the result isn't too different.

Given that, I think we can leave it as is for now. If we really want to improve the way it's rendered, one way might be to patch all of the topic pages (defined in the pydoc_data.topics.topics dict) with our own versions rewritten in rST.

isabelizimm commented 1 year ago

I think keeping the indentation of my screenshot is a bit more readable, so I would be in favor of not parsing it for now. Agreed, we can rewrite them in rst at a later point.