-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Multiline image links broken in (GitHub's) markdown #29
Comments
Apparently caused by https://githubengineering.com/a-formal-spec-for-github-markdown/, as per spec: https://github.github.com/gfm/#link-destination
Having newlines or spaces in link destinations is now considered invalid. |
I need to check but I think we should start to move to indirect way . Thanks @sldblog |
Have the same issue. For our team I think the best would be to have a small command line tool for encoding/decoding the README.md since it would be difficult to use the indirect way with pull requests (URL pointing to file on branch). |
maybe support URL encoded graph for the moment? |
URL encoded should works. I know the problems with pull requests and indirect way :(, Could it be a solution try some kind of branch detection in github? |
Have made a small gravizo tool for being able to use gravizo with pull requests. It encodes/decodes GitHub Markdown files. The idea is to e.g. use Atom for direct Markdown rendering, encode and upload to GitHub. For changing a file, decode it, change and encode again. We will try to use it within our team. A bit quickly made so only works with svg URLs, needs to end with "enduml)". Room for improvements ;) |
@TLmaK0 in https://github.com/TLmaK0/gravizo/blob/master/README.md the links still point to the fix/README branch. Is there an issue with caching and indirect way? Currently if I hit one graph I have (https://g.gravizo.com/source/extract_video?https%3A%2F%2Fraw.githubusercontent.com%2FIBM-Bluemix%2Fopenwhisk-darkvisionapp%2Fmaster%2FREADME.md) directly, I can see the graph correctly rendered but in the README.md (https://github.com/IBM-Bluemix/openwhisk-darkvisionapp) it is still showing an old version - one that did not render. Should gravizo set cache-control header on the response (and ETag)? |
@l2fprod this is something that I should check again, actually it returns cache-control: no-cache, but I don't know how github its handling the cache. Meanwhile you can add a ? at the end of the link to clear the cache. |
Thank you. I don't see the cache-control header with curl or with Chrome inspector:
|
@l2fprod you are right, I will review cloudflare configuration. |
@l2fprod I have added the cache-control for graphs in indirect way |
@TLmaK0 thanks, that works, GitHub has refreshed the embedded graphs without me changing anything. |
I made a gist to help people who don't understand what https://gist.github.com/svenevs/ce05761128e240e27883e3372ccd4ecd |
Seems like there are multiple tools to handle this kind of thing and it's unlikely that GitHub readme parsing will be relaxed. I think this can be closed when
|
If updating the samples on the homepage happens, it may be worth mentioning that this only breaks direct readme rendering on github. It still works elsewhere on github, e.g. I have a Jekyll site using kramdown and the gravizo direct method that still works. Maybe that will change, but the point is more that the direct method still works without urlencoding for markdown parsers that uhhhh... Aren't github. |
Just to chime in here, have you guys considered participating in the CommonMark spec discussion? It sounds like you have a pretty good use case for mutli-line links. The spec is currently in version 0.26, I imagine there's still room for adjustment :) If someone ends up participating, leave a thread link. I'd be curious to see how it goes. |
It seems the multiline image links as mentioned in all the examples no longer work in GitHub's markdown files. (It does work if we use properly escaped URLs.)
https://github.com/TLmaK0/gravizo/blob/master/README.md
Same result with my browser extensions turned off.
The text was updated successfully, but these errors were encountered: