Skip to content
This repository has been archived by the owner. It is now read-only.

View raw non-rendered markdown source with line numbers on file blob show view #297

Closed
cirosantilli opened this issue Nov 13, 2014 · 17 comments
Closed

Comments

@cirosantilli
Copy link
Collaborator

@cirosantilli cirosantilli commented Nov 13, 2014

Currently, it is not possible to view the highlighted markdown source with line numbers like it is possible for non-markdown files: only the rendered HTML shows:

vs

I want to do this to be able to link to specific lines of the markdown file, like can be done with other file types. Header IDs are somewhat of a workaround, but not enough as you may want to comment any specific line.

It would also enable stuff like: #295, #293 (comment) for markdown.

On GitLab: http://feedback.gitlab.com/forums/176466-general/suggestions/6563749-also-show-non-rendered-markdown-on-blob-show

This is already even possible for SVGs where you have "Display the source blob" and "Display the rendered blob" buttons: https://github.com/corkami/pics/blob/28cb0226093ed57b348723bc473cea0162dad366/binary/elf101/elf101-64.svg Come on GitHub!

@cirosantilli cirosantilli changed the title Also show non-rendered markdown on blob show View non-rendered markdown source with line numbers on blob show Nov 13, 2014
@aspiers
Copy link
Collaborator

@aspiers aspiers commented Oct 9, 2015

UPDATE: https://github.com/petros replied with template.

What do you mean by this exactly? Thanks for any info!

Loading

@cirosantilli
Copy link
Collaborator Author

@cirosantilli cirosantilli commented Oct 9, 2015

@aspiers ah, I (cryptically) meant "with the standard ACK reply" :-) I don't even do those updates anymore, they always reply.

Loading

@aspiers
Copy link
Collaborator

@aspiers aspiers commented Oct 9, 2015

Ah right. The only workaround I found so far was to use the blame view instead, which is obviously not great.

Loading

@SamirBoulil
Copy link

@SamirBoulil SamirBoulil commented Apr 11, 2016

I'm also interested in having a repository settings option to tell github wether I want my markdown files to be rendered or wether I want to display raw markdown files (BLOB).

Loading

@NfNitLoop
Copy link

@NfNitLoop NfNitLoop commented Aug 8, 2016

I'd love this feature too! Wanted to link someone to a particular line of a longish README.md, but you either get the rendered Markdown w/o lines, or you can click "raw" and see the file w/o GitHub's nice line formatting.

Loading

@cirosantilli
Copy link
Collaborator Author

@cirosantilli cirosantilli commented Aug 10, 2016

@iliastsangaris please use the new +1 button feature instead of comments to avoid notifying people and have an automated upvote count ;-)

Loading

@pzanitti
Copy link

@pzanitti pzanitti commented Feb 14, 2018

I got here because I was wondering how to open an issue from markdown code, so I had to figure out a workaround.

Currently you have to find the .md file, press 'y' to find the blob hash, go to Blame view, find the line numbers, and then manually assemble the reference.

e.g.

Want to reference line 48 of https://github.com/isaacs/github/blob/master/README.md. Master is 001e354f8c7be0d8accccd0f5c9644c7910832b8, line number is L48:

https://github.com/isaacs/github/blob/001e354f8c7be0d8accccd0f5c9644c7910832b8/README.md#L48

I'm very thankful to GitHub, and the great work they do. When I shake

Loading

@goswami-rahul
Copy link

@goswami-rahul goswami-rahul commented Jul 14, 2018

@pzanitti

Currently you have to find the .md file, press 'y' to find the blob hash, go to Blame view, find the line numbers, and then manually assemble the reference.
e.g.
Want to reference line 48 of https://github.com/isaacs/github/blob/master/README.md. Master is 001e354, line number is L48:
https://github.com/isaacs/github/blob/001e354f8c7be0d8accccd0f5c9644c7910832b8/README.md#L48

I'm very thankful to GitHub, and the great work they do. When I shake

https://github.com/goswami-rahul/alien-invasion-game/blob/027071489c12df633d362351364b642443a4415f/README.md#L8

I wonder why doesn't it work in my repo?

Loading

@janisozaur
Copy link

@janisozaur janisozaur commented Aug 6, 2018

I wonder why doesn't it work in my repo?

It works just fine. It doesn't render here, because this is isaacs/github and not goswami-rahul/alien-invasion-game

Loading

@cirosantilli cirosantilli changed the title View non-rendered markdown source with line numbers on blob show View raw non-rendered markdown source with line numbers on blob show Aug 6, 2018
@cirosantilli cirosantilli changed the title View raw non-rendered markdown source with line numbers on blob show View raw non-rendered markdown source with line numbers on file blob show view Aug 6, 2018
@XedinUnknown
Copy link

@XedinUnknown XedinUnknown commented Sep 2, 2018

Almost 4 years now. Any progress?

Loading

@binki
Copy link

@binki binki commented Sep 2, 2018

@XedinUnknown Please note that this is a repository only for tracking gripes people have with GitHub. The operators of this repository do not have any power to add features to GitHub itself. If you are interested in seeing progress, consider using Contact GitHub to send GitHub itself feedback about the issue. See https://github.com/isaacs/github/blob/master/README.md .

Loading

@dhimmel
Copy link

@dhimmel dhimmel commented Apr 1, 2019

Note this question is also on StackOverflow here. As someone who works with markdown files a lot, I run into this issue all the time. I'm surprised GitHub is taking so long to address it!

@cirosantilli the GitLab Feedback link in your comment now seems to redirect to a blog post.

On GitLab: http://feedback.gitlab.com/forums/176466-general/suggestions/6563749-also-show-non-rendered-markdown-on-blob-show

Regarding GitLab however, there is a frontend option to "display source" (pull request). When linking to a markdown file with #L suffix in the URL, it defaults to "display source" rather than "display rendered file".

Loading

@Frug
Copy link

@Frug Frug commented Jan 14, 2020

I'm rather surprised not to be able to turn off the preview for READMEs. It never mattered for me... until I wanted to link someone to a line in the readme.

Wouldn't a preview button to view it rendered make sense?

Loading

@fr0
Copy link

@fr0 fr0 commented Jan 22, 2020

Has anyone submitted this to GitHub support as a request? I'm not sure that they check this repo.

Loading

@ABHISHEK-G0YAL
Copy link

@ABHISHEK-G0YAL ABHISHEK-G0YAL commented Oct 14, 2020

Any progress! I too want my markdown files to not be rendered as they are used by a jekyll project. Github renders my markdown file horribly wrong that I want it to not render it.
https://github.com/ABHISHEK-G0YAL/Hacktoberfest-2020/blob/master/index.md (This is how github renders it)
https://abhishek-g0yal.github.io/Hacktoberfest-2020/ (This is how my jekyll site renders it)
https://raw.githubusercontent.com/ABHISHEK-G0YAL/Hacktoberfest-2020/master/index.md (This is how it is raw)
You can see the links for reference.

Loading

@christianh814
Copy link

@christianh814 christianh814 commented Nov 5, 2020

Just adding my +1 ..this would be a cool feature

Loading

@TPS
Copy link
Collaborator

@TPS TPS commented Jul 2, 2021

Announced via https://github.blog/changelog/2021-06-30-parameter-to-disable-markdown-rendering/: Append ?plain=1 to URL & further add #L[line #] for line highlighting (as is typical).

Loading

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet