fix the build

This commit is contained in:
Régis Hanol 2014-03-27 16:57:46 +01:00
parent e663d78104
commit 5edec22e28
3 changed files with 12 additions and 8 deletions

View File

@ -134,6 +134,10 @@ Discourse.Markdown = {
if(/^(https?:)?\/\/[\w\.\-]+/i.test(url)) { return url; }
// relative urls
if(/^\/[\w\.\-]+/i.test(url)) { return url; }
// anchors
if(/^#[\w\.\-]+/i.test(url)) { return url; }
// mailtos
if(/^mailto:[\w\.\-@]+/i.test(url)) { return url; }
},
/**

View File

@ -56,7 +56,7 @@ In this case, [this](/somethingelse/) points to something else.
Backslashing should suppress \[this] and [this\].
[this]: foo
[this]: #foo
* * *

View File

@ -19,15 +19,15 @@
<hr />
<p><a href="foo">this</a> should work</p>
<p><a href="#foo">this</a> should work</p>
<p>So should <a href="foo">this</a>.</p>
<p>So should <a href="#foo">this</a>.</p>
<p>And <a href="foo">this</a>.</p>
<p>And <a href="#foo">this</a>.</p>
<p>And <a href="foo">this</a>.</p>
<p>And <a href="#foo">this</a>.</p>
<p>And <a href="foo">this</a>.</p>
<p>And <a href="#foo">this</a>.</p>
<p>But not [that] [].</p>
@ -35,9 +35,9 @@
<p>Nor [that].</p>
<p>[Something in brackets like <a href="foo">this</a> should work]</p>
<p>[Something in brackets like <a href="#foo">this</a> should work]</p>
<p>[Same with <a href="foo">this</a>.]</p>
<p>[Same with <a href="#foo">this</a>.]</p>
<p>In this case, <a href="/somethingelse/">this</a> points to something else.</p>