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
render
#211
Comments
Thanks for your feedback, let me test it first. |
The clone is actually finished, it's the problem that somewhat cannot open the repository. @slene do you have any idea? |
@slene It's the infinity loop in code block https://github.com/gogits/gogs/blob/master/routers/repo/repo.go#L184-L234 , if I directly type single file URL, I can view normally. |
Problem actually seems to be in markdown rendering for Readme.md file in base.RenderMarkdown, so perhaps there is a bug in the markdown renderer or and error in my readme file that your renderer cannot handle |
Do you think I should open a new issue with correct description since it turned out that the problem is not really the cloning of the repo but markdown render engine going in to infinite loop for some reason since the readme is not markdown but restructured text? |
@boarpig Sorry for delay, I've read your comment but forgot to reply. I think you can just change the title of issue would be fine! |
BTW, is rst is some doc format? I'm not familiar with it. Also you have |
I'll do some research see if Go has some parser for |
Yes, restructured text is a text document format very similar to markdown but predates it by few years. It's very used in python documentation and you need to have your readme in rst format in order to submit your project into python package index so it's more convenient for me to only have one readme in rst instead of having them in markdown and rst Here's a reference |
Thanks for your info. I'll take a look tonight. |
https://github.com/demizer/go-rst seems like half-work done for parsing but not rendering to HTML. I currently check the extension for not rendering |
Both rst and markdown are designed to be readable even as pure ascii so that shouldn't be a problem. I much rather take unrendered rst than not being able to use the server. Thanks a lot, Unknwon. |
@boarpig no problem, I asked author of https://github.com/demizer/go-rst and that does not work yet, so it may take some times to get a time to write a rst parser. |
Would it be possible, that when ever the readme is not rendered, it would be monospace font and follow the newlines like it was ascii fine instead of html. That would make most any readme look fine without rendering |
Definitely possible. |
.rst
render
Any news on this feature? |
如果暂时找不到完美的go rst渲染引擎,能否实现一个扩展机制: 支持rst期待已久,希望早日实现。 |
@LoongW sounds workable... |
Agreed with @LoongW. Hugo does something similar for alternative markup formatting. For rst, They basically execute Here's the hugo method that implements the rst rendering:
This is an easy way to support markup languages that do not yet have a Go implementation. |
👍 |
This is related to #2097 and an external renderer might be a solution for both. |
Would be great to have support for it |
+1 |
2 similar comments
+1 |
+1 |
Please use the builtin +1 function, it's annoying to receive such useless emails |
I recently did a quick-and-dirty hack on Gogs to add some basic .rst support for our own use, but maybe you will also find it useful: |
You could also try calling the docutils API via https://github.com/sbinet/go-python |
@kaeptmblaubaer1000 and @LoongW's suggestions both sound awesome. I really like the idea of actually linking in to an "authoritative" library (provided there's not too much performance impact, to get that beautiful canoncal parsing), but honestly even just some FastCGI-style hack sounds like it wouldn't really lock us in too much, and in the meantime provide an immensely effective workaround until this is supported fully. |
Why not just display it as text? Instead of looking for some complicated solution there must be a simple one in place. |
I installed your official linux x64 binary on my desktop and set it up to use sqlite. Then as a first thing I tried migrating my github repo
https://github.com/boarpig/issue
but it seemed to load forever. It seems it cloned it fine but cannot open the page for it. I suspected it could be something with the size of the repository but cloning gogs repository works fine.
Then I wondered if it was the name of the repo "issue" but I tried making a copy with a different name but that didn't seem to work either. There's something wrong with that repository, that makes gogs load forever and not even give any sort of error.
The text was updated successfully, but these errors were encountered: