Skip to content
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

Please add support for a few more Sphinx extensions #49

Closed
sitsofe opened this issue Jan 31, 2017 · 7 comments
Closed

Please add support for a few more Sphinx extensions #49

sitsofe opened this issue Jan 31, 2017 · 7 comments
Assignees

Comments

@sitsofe
Copy link

sitsofe commented Jan 31, 2017

(I was directed over here because Github uses TextMate-style language grammars through the linguist project (https://github.com/github/linguist/ ) and linguist points (https://github.com/github/linguist/tree/master/vendor/grammars ) to the language-restructuredtext project)

Could support for a few more Sphinx extensions be added? Over on https://gist.github.com/sitsofe/5610dafcddc5c89c8dbb9e5d3bce668d#job-description the one that is most problematic is the .. option:: directive (http://www.sphinx-doc.org/en/stable/domains.html?highlight=option#directive-option ). There are few others such as the :option: inline markup (http://www.sphinx-doc.org/en/stable/markup/inline.html#role-option ) and :manpage: inline markup (http://www.sphinx-doc.org/en/stable/markup/inline.html?highlight=manpage#role-manpage ) but those are more minor...

@Alhadis
Copy link
Collaborator

Alhadis commented Jan 31, 2017

It'd be my pleasure. Give me a comprehensive list of what you'd like added and I'll see to it right away.

Doesn't matter if they're minor, it's good to be comprehensive.

@Alhadis Alhadis self-assigned this Jan 31, 2017
@sitsofe
Copy link
Author

sitsofe commented Jan 31, 2017

Wow - thank you!

My own selfish reasons are to have enough to render https://github.com/axboe/fio/blob/master/HOWTO and https://github.com/axboe/fio/blob/master/README on github.

For directives that would be:

.. option

For inline markup:

:command:
:file:
:kbd:
:manpage:
:noindex:
:option:
:ref:

If you're looking for the full list beyond what I need I guess it would be http://www.sphinx-doc.org/en/stable/domains.html?highlight=option#the-standard-domain and http://www.sphinx-doc.org/en/stable/markup/inline.html?highlight=manpage#inline-markup .

I didn't mean it as a demand so let me know what you think.

@Alhadis
Copy link
Collaborator

Alhadis commented Jan 31, 2017

No problem. I'll start soon.

@Alhadis
Copy link
Collaborator

Alhadis commented Jan 31, 2017

* s/soon/once I've finished pillaging VSCode for stuff that's missing from file-Icons/i;

Common typo, sorry.

@Alhadis
Copy link
Collaborator

Alhadis commented Jan 31, 2017

Wait. Are you expecting this to affect the rendered markup on GitHub, or just reStructuredText's syntax highlighting? It occurred to me just now you mightn't know that the two are very separate. We can control syntax highlighting, but the way GitHub renders markup is entirely up to them.

If it's the latter, you'd be better off submitting a request to GitHub support.

@Alhadis
Copy link
Collaborator

Alhadis commented Jan 31, 2017

Okay, yeah, after examining this closer, I realise this is what you probably meant - the highlighting for .. option directives looks fine in Atom, as do the other tags you mentioned.

Feel pretty silly now, heh.

@sitsofe
Copy link
Author

sitsofe commented Jan 31, 2017

@Alhadis You're absolutely right - looks like I went in the wrong direction. Investigating further the raw markup to HTML conversion is done by https://github.com/github/markup using rst2html . The problem is rst2html errors on Sphinx extensions which is why the Sphinx project recommends using a .txt extension rather .rst (http://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#filenames ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants