title: Markdown/Jekyll: Auto-surround bare URLs with angle brackets?
body: <p>I notice that some Markdown parsers and GitHub will auto-convert bare URLs to links, but others (<a href="https://github.com/gettalong/kramdown/issues/306" rel="nofollow noreferrer">like Kramdown</a>) don't.  The standard Markdown syntax requires that URLs be wrapped in angle brackets, e.g. <code>&lt;https://www.google.com/&gt;</code>.</p>
  
  <p>I have a number of documents with bare URLs that appear as desired, i.e. as hyperlinks, in my Markdown editor but are not getting rendered as links when I push them in Jekyll to GitHub Pages.</p>
  
  <p>How can I write a script to surround bare URLs with angle brackets?
  Preferably via shell scripting, standard command line tools (sed, awk) or Python.   Or perhaps there's already a Jekyll plugin for this?   </p>
  
  <p>I know that matching URLs is highly nontrivial, so wanted to ask here on SO before getting too deep into this.</p>
  
  <p><strong>Further difficulty:</strong> The solution should only change <em>bare</em> URLs, and leave alone URLs that have already been wrapped/encoded via standards-compliant Markdown or HTML. </p>
  
  <p>(I expected this to be a common question, and it <em>is</em> in various GitHub-Issues posts for various packages, with no solutions... But tried searching for this question here and couldn't find it already asked, <a href="https://www.google.com/search?q=%22jekyll%22+%22bare+urls%22+markdown&amp;ei=MTvoXtasJPadwbkPy7q7yAY&amp;start=10&amp;sa=N&amp;ved=2ahUKEwiWieaJsYXqAhX2TjABHUvdDmkQ8NMDegQIDBAx&amp;biw=1148&amp;bih=609" rel="nofollow noreferrer">nor any premade Jekyll solutions</a>. I found many questions about matching when the angle brackets are already there, but not ones to <em>add</em> the angle brackets.  Yet I'm imagining the solution has been implemented many, many times -- in the very tools we use, such as GitHub and <a href="https://mathoverflow.net/editing-help#bare-urls">MathOverflow</a> -- so, not sure why the means to do this isn't widely posted.)</p>