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

Add support of .rst language #1823

Closed
bocharsky-bw opened this issue Sep 5, 2018 · 7 comments
Closed

Add support of .rst language #1823

bocharsky-bw opened this issue Sep 5, 2018 · 7 comments

Comments

@bocharsky-bw
Copy link

bocharsky-bw commented Sep 5, 2018

Or can I highlight .rst files with HighlightJS in some way? Probably a similar language? Any ideas?

@gusbemacbe
Copy link
Contributor

I rewrite what @ldct said in other issues:

We can review and merge PRs with language implementations but won't be able to actually implement all the requested languages.

Please see http://highlightjs.readthedocs.io/en/latest/language-requests.html for more details.

@bocharsky-bw
Copy link
Author

@gusbemacbe of course, it makes sense. Thanks for pointing to this. But I'm not going to implement this either, at least for now. Could you advise me how I can highlight rst files for now? Maybe some kind of default or similar language? Thanks!

@gusbemacbe
Copy link
Contributor

HI @bocharsky-bw

You can read the short language guide to build a new syntax:

https://github.com/highlightjs/highlight.js/blob/master/docs/language-guide.rst

Or you can copy any of language syntax: https://github.com/highlightjs/highlight.js/tree/master/src/languages and modify, and implement.

@bocharsky-bw
Copy link
Author

OK, thanks for your help

@jolkdarr
Copy link

jolkdarr commented Sep 6, 2018

Hi

Asciidoc is supported. Maybe it's a good template for reStructuredText format.

@bocharsky-bw
Copy link
Author

Hey @jolkdarr ,

Thanks for this advice! I have even never heard about Asciidoc, but its syntax looks similar. FYI, I reused Markdown language highlighting for .rst files so far, but will take a look at Asciidoc, maybe it would even better.

Cheers!

@jolkdarr
Copy link

jolkdarr commented Sep 7, 2018

Hi

Glad to know that could help! ;)
Main markup formats are compared at many sites such the following:
http://hyperpolyglot.org/lightweight-markup

I think both Markdown and Asciidoc should be used to achieve .rst support.

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

No branches or pull requests

3 participants