-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Link PR and issues in README #13099
Link PR and issues in README #13099
Conversation
Readme becomes slightly more annoying to edit, but no big deal probably. I'll consider it. |
If needed this script can convert the README automatically (it check for the # to not have a [ before so it won't change already changed one), if you want I can just commit it.
|
Yeah, throw in the script, that's nice. |
Though I just thought of something else, the .md is also used as the README.txt kind of equivalent, and it got a lot harder to read in raw text form with this unfortunately. Not that big of a deal though... |
Thanks for implementing this @iota97. I'm late to the party but I've also written a python script but never submitted it, but after seeing your script I would like to nit-pick a little and recommend the use I'm kinda disappointed that hovering over the urls doesn't reveal that issue/pr sneak peak with the title and description (like it does when referencing in comments) since that was be very useful when skimming through the changes. Well, maybe that would be a feature request for dear-github.
I already thought about that and have a solution for you. This solves two problems but could be considered hacky:
#!/usr/bin/env python
import re
with open('README.md', 'r+') as f:
md = re.sub('(?<!\[)#(\d+)', '[#\\1](/../../issues/\\1)', f.read())
f.seek(0)
f.write(md)
f.truncate() So this What's new in 1.10.0
--------------------
* Graphics and compatibility fixes ([#12800](https://github.com/hrydgard/ppsspp/issues/12800), [#12670](https://github.com/hrydgard/ppsspp/issues/12670), [#12635](https://github.com/hrydgard/ppsspp/issues/12635), [#12857](https://github.com/hrydgard/ppsspp/issues/12857), [#12941](https://github.com/hrydgard/ppsspp/issues/12941), [#11898](https://github.com/hrydgard/ppsspp/issues/11898), [#12695](https://github.com/hrydgard/ppsspp/issues/12695), more) becomes this What's new in 1.10.0
--------------------
* Graphics and compatibility fixes ([#12800](/../../issues/12800), [#12670](/../../issues/12670), [#12635](/../../issues/12635), [#12857](/../../issues/12857), [#12941](/../../issues/12941), [#11898](/../../issues/11898), [#12695](/../../issues/12695), more) |
FYI - the way to keep it readable in markdown, and also to add title previews, is this:
Which looks like this:
-[Unknown] |
Wow, that's even cleaner (minus the repo changing the name though). Needs a more advanced script to fetch all the titles but should be easy enough. I can create one if you want to do it that way :) |
Well, the only trouble with relative links is I don't think there's a way to specify a base path ( -[Unknown] |
Updated in #13153 About relative link I prefer to have it accessible from everywhere (it would broke it outside of github and on fork as well). As URL are at the end of the file how long they are should not be a concern anymore, and if repo changes name a regex will fix it in no time anyway. |
This will make them clickable for now, not sure if is worth the trouble tho'.