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

rst Support #112

Open
brian6932 opened this issue Feb 1, 2024 · 3 comments
Open

rst Support #112

brian6932 opened this issue Feb 1, 2024 · 3 comments

Comments

@brian6932
Copy link

brian6932 commented Feb 1, 2024

ReStructured Text's kinda like Markdown, and with this GH issue being a thing https://github.com/orgs/community/discussions/86715. It's a better time than any to add support.

@Cimbali
Copy link
Owner

Cimbali commented Feb 12, 2024

TL;DR: I think this add-on doesn’t work like you think it does, and is not applicable to the github bug. Also would be a lot of work.


A couple of thoughts regarding this suggestion:

  • The bug in github rendering is being investigated by github so I doubt it’s more than a temporary issue
  • This add-on doesn’t render markdown inside boxes of an html page. It only renders full markdown pages. This means that pages like https://github.com/…/page.rst (which is where the bug happens) are not affected. You would have to access something like the raw version of the page, i.e. https://raw.githubusercontent.com/…/page.rst.
  • However, github prevents tampering with (and thus rendering the syntax of) raw pages through CORS headers, so unless you override those headers this add-on won’t render raw github pages either. (But it works on e.g. raw gitlab pages.)
  • I think that supporting rst imply getting a different rendering engine (the current one doesn’t support it), including all the pipeline of addons etc. (Or a conversion from rst to md but that’s not ideal as we’ll certainly lose info doing that.) So overall a significant amount of work.
  • I tend to prefer addons that do a single thing and do it well, rather than addons that try and do a bit of everything. Aren’t there rst-rendering addons out there that you could look at to work around the bug?

@brian6932
Copy link
Author

brian6932 commented Feb 12, 2024

I mean I use the addon, I know how it works, sorry for not being clear enough, I was implying you'd open the raw page.

However, github prevents tampering with (and thus rendering the syntax of) raw pages through CORS headers, so unless you override those headers this add-on won’t render raw github pages either. (But it works on e.g. raw gitlab pages.)

I do override CORS.

Aren’t there rst-rendering addons out there that you could look at to work around the bug?

I honestly don't know of any.

I completely understand if you feel that it's out of scope, I just didn't really have anywhere to turn to. rst rendering's honestly pretty rare from what I saw, I made the same feature request for glow as well.

@Cimbali
Copy link
Owner

Cimbali commented Feb 12, 2024

I’m not closing as wontfix as I’m willing to consider it – but definitely won’t have time to do this myself any time soon. In your use case (raw page + CORS override), that could work indeed.

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

2 participants