-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling reStructuredText in docstrings? #760
Comments
So, we should probably convert from rst to markdown for known libraries? microsoft/language-server-protocol#791 Using pandoc or something similar https://gist.github.com/zaiste/77a946bbba73f5c4d33f3106a494e6cd ? Thoughts @ccordoba12 @andfoy ? |
This is is the only alternative available, as LSP maintainers denied an RST proposal sent last year: microsoft/language-server-protocol#781 |
FWIW, pandoc is a huge and also GPL-ed dependency. I suspect something homemade like Microsoft did is the cleanest way to do it. Or maybe an existing Python library like https://github.com/sixty-north/rst_to_md ? FYI CommonMark is the best Markdown spec out there: https://commonmark.org |
Some Python docstrings use
reStructuredText
, one notable example being pandas. Here's an example from that link:I noticed that
python-language-server
feeds these docstrings back directly to the client without any transformation into Markdown, so they don't always render well when you do things like hovers. For example, the code block sections beginning with>>>
don't look good. This is actually the cause of issue #291 .The Microsoft language server has special parsing code in it to handle this; see https://github.com/microsoft/python-language-server/blob/master/src/LanguageServer/Impl/Documentation/DocstringConverter.cs.
Is there some way to address this within this language server? Thanks!
The text was updated successfully, but these errors were encountered: