tag:help.tenderapp.com,2008-11-12:/discussions/problems/447-truncated-urls-in-code-blocksTender: Discussion 2012-07-20T12:23:49Ztag:help.tenderapp.com,2008-11-12:Comment/1035732009-04-02T11:40:45Z2009-04-02T11:40:49ZTruncated URLs in Code Blocks<div><p>Hello,</p>
<p>I think I wasn't particularly clear. I'm wondering if there's
any way of avoiding shortened URLs in code blocks. We host our
documentation on Tender, and installation instructions in
particular would benefit from full-length URLs, since they would be
cut-and-paste compatible.</p>
<p>I might have missed some trick to achieve this with markdown. If
not, a reply would be great!</p>
<p>Thank you,</p>
<p>thomas.</p></div>Thomas Bukowskitag:help.tenderapp.com,2008-11-12:Comment/1035732009-04-02T13:25:25Z2009-04-02T13:25:25ZTruncated URLs in Code Blocks<div><p>You can put quotes around it, or use a markdown link:</p>
<p>
"https://help.tenderapp.com/discussions/problems/380-how-to-escape-an-url"</p>
<p>Here is how you <a href=
"https://help.tenderapp.com/discussions/problems/380-how-to-escape-an-url">
escape a URL</a> <code>[escape a URL](...)</code></p></div>ricktag:help.tenderapp.com,2008-11-12:Comment/1035732009-04-02T22:41:35Z2009-04-02T22:41:36ZTruncated URLs in Code Blocks<div><p>That works for inline links, but can URLs inside code blocks
also be untruncated? By code block, I mean several lines prefixed
with four spaces:</p>
<pre>
<code>script/plugin install http://newrelic.rubyforge.org/svn/newrelic_rpm</code>
</pre>
<p>Since it's a code block, neither the quote trick nor the
markdown link works, and the link gets truncated.</p></div>Thomas Bukowskitag:help.tenderapp.com,2008-11-12:Comment/1035732009-04-24T15:37:07Z2009-04-24T15:38:10ZTruncated URLs in Code Blocks<div><p>+1 to fixing this. It is a nightmare for writing REST API
docs.</p>
<p>In fact, why is any markdown processed in code blocks at all?
Inside the indented area there should be no processing whatsoever
other than escaping HTML entities.</p>
<p>Also escaping it via
<code>[http://myurl.com/](http://myurl.com)</code> doesn't work, at
least in the context in which I tried it.</p></div>Michael Bleightag:help.tenderapp.com,2008-11-12:Comment/1035732009-05-01T23:30:28Z2012-07-20T15:40:08ZTruncated URLs in Code Blocks<div><p>A Lighthouse ticket was created for this discussion</p></div>Systemtag:help.tenderapp.com,2008-11-12:Comment/1035732009-05-01T23:30:52Z2009-05-01T23:30:52ZTruncated URLs in Code Blocks<div><p>I think we'll take a look at how to disable the autolink inside
code blocks. It's starting to get a bit annoying on our end
too.</p></div>Kyle Neath (GitHub Staff) tag:help.tenderapp.com,2008-11-12:Comment/1035732009-05-27T06:23:58Z2009-05-27T06:23:58ZTruncated URLs in Code Blocks<div><p>Thomas: I've fixed the issue, but I had to modify your example a
bit. The autolinker still picks up URLs in the markdown code
blocks. It's preferable if you use the @@@ syntax to specify the
code blocks so that the parser can recognize it and process it
outside of markdown and the autolinker.</p></div>ricktag:help.tenderapp.com,2008-11-12:Comment/1035732009-05-27T06:47:21Z2009-05-27T06:47:21ZTruncated URLs in Code Blocks<div><p>Okay, so the @@@ syntax is not required. The custom formatter
now doesn't run the autolinker or markdown formatters on any
pre-formatted content.</p></div>rick