Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

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

Closed

Description

@cirosantilli

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!

Activity

  1. changed the title [-]Also show non-rendered markdown on blob show[/-] [+]View non-rendered markdown source with line numbers on blob show[/+] on Nov 13, 2014
  2. aspiers commented on Oct 9, 2015

    @aspiers
    Collaborator

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

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

  3. cirosantilli commented on Oct 9, 2015

    @cirosantilli
    CollaboratorAuthor

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

  4. aspiers commented on Oct 9, 2015

    @aspiers
    Collaborator

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

  5. SamirBoulil commented on Apr 11, 2016

    @SamirBoulil

    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).

  6. NfNitLoop commented on Aug 8, 2016

    @NfNitLoop

    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.

  7. cirosantilli commented on Aug 10, 2016

    @cirosantilli
    CollaboratorAuthor

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

  8. pzanitti commented on Feb 14, 2018

    @pzanitti

    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

  9. goswami-rahul commented on Jul 14, 2018

    @goswami-rahul

    @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?

  10. janisozaur commented on Aug 6, 2018

    @janisozaur

    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

  11. 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[/+] on Aug 6, 2018
  12. 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[/+] on Aug 6, 2018
  13. XedinUnknown commented on Sep 2, 2018

    @XedinUnknown

    Almost 4 years now. Any progress?

  14. binki commented on Sep 2, 2018

    @binki

    @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 .

  15. added a commit that references this issue on Mar 22, 2019
  16. dhimmel commented on Apr 1, 2019

    @dhimmel

    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".

  17. Frug commented on Jan 14, 2020

    @Frug

    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?

  18. fr0 commented on Jan 22, 2020

    @fr0

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

  19. ABHISHEK-G0YAL commented on Oct 14, 2020

    @ABHISHEK-G0YAL

    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.

  20. christianh814 commented on Nov 5, 2020

    @christianh814

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

  21. TPS commented on Jul 2, 2021

    @TPS
    Collaborator

    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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions