Auto-link URLs in GitHub flavored markdown

Russell Horton's Avatar

Russell Horton

07 Sep, 2012 11:09 AM

GitHub says that "GFM will autolink standard URLs, so if you want to link to a URL (instead of setting link text), you can simply enter the URL and it will be turned into a link to that URL." http://github.github.com/github-flavored-markdown/

This would be a nice feature to add to the GitHub mode of Marked.

Marked is really terrific, thanks for the app!

  1. Support Staff 1 Posted by Brett on 24 Sep, 2012 11:51 PM

    Brett's Avatar

    This isn't GFM, and I don't intend to stray to far from the standards of the selected processor. This kind of thing is easily done with custom processors or post-processors.

    Also, if the final destination happens to be Github, the urls will be linked when you post it anyway...

  2. 2 Posted by Andrew Stevens on 17 Mar, 2014 06:36 PM

    Andrew Stevens's Avatar

    I believe Github does now autolink (example: http://example.org autolinks when I send it to githubs markdown processor) see http://developer.github.com/v3/markdown/

    I would also really like a checkbox for this autolink feature too, as it's annoying for me to struggle to turn it on with a 'custom processor'. I'm trying to get the current plugin I use in sublimetext2&3
    https://github.com/revolunet/sublimetext-markdown-preview
    to integrate with marked2, So I can just use the same configs I have for sublimetext-markdown-preview. This way marked2 will just use sublimetext-markdown-preview setup, by using marked2's 'custom processor' checkbox feature.

    However I fear sublimetext-markdown-preview will wrap it's output with html, and ruin the swiss.css styling. Oh woe is me, woe is me. Also I fear that sublimetext-markdown-preview is a sublimetext2 plugin so it will rely on some sublime features, like the python packages:
    import sublime
    import sublime_plugin

    Which might make it hard to run as just a command line app, but since my settings are stored in sublime.load_settings('MarkdownPreview.sublime-settings'), it'd be nice if I could make it a command line app.

    I shall report back here if I ever fix my issue using my custom processor.

    If you happen to enable a autolink checkbox before I finish. I'd appreciate a note in this thread. Thanks for the great app Brett. It's amazing as it is. (don't ruin it with my extra checkboxes)

  3. Support Staff 3 Posted by Brett on 17 Mar, 2014 07:51 PM

    Brett's Avatar

    I dug the autolink algorithm out of redcarpet, I'll consider
    implementing it.

    I'm not completely sure what you're doing for a custom processor. Are
    you rendering it with a Sublime package?

  4. 4 Posted by Michael Trafton on 26 May, 2014 10:12 PM

    Michael Trafton's Avatar

    +1 for including Autolinking out of the box.

  5. 5 Posted by Andrew Stevens on 19 Oct, 2016 08:39 PM

    Andrew Stevens's Avatar

    I have more recently been using a custom processor. I forked octodown and made some modifications, but it has been working great for me.

    path: /Users/andxyz/.rbenv/shims/octodown
    args: --gfm --style githubformarkedapp --raw-for-markedapp

    see
    https://cl.ly/1D400e0r0H2c/Image%202016-10-19%20at%204.36.51%20PM.png

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac