Feature Request: Parse id, username, filename from the Gist
Hi @tleunen, thank you for putting out this component!
I was wondering about your thoughts on the component accepting a gist url and then parsing information to show relevant gist/file?
I imagine that this would be a common enough use-case that a lot of people would be reinventing when they use this component.
Hey @oyeanuj.
Yes, I believe this could be added as well. Indeed, people probably have the url instead of the specific id. So we could have a url prop which will parse it to know what we have to display...
Awesome! Another advantage I realized would be that incase url format changes in the future, the change needs to only be made in one place by the library rather then everyone else!
Also, appreciate the instant response :)
Feel free to submit a PR if you're interested in taking that :)
I am not that good with regexes but will share a solution if I end up with one, as I soon plan to integrate with the library.
Btw, If you are more familiar with regex, then I'm sure I could create a PR with your help!