KyleRombach / wmd-new

Automatically exported from code.google.com/p/wmd-new
0 stars 0 forks source link

URLs are not auto-linked #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Go to demo http://wmd-new.googlecode.com/hg/wmd-test.html
2. Type `http://example.com`

What is the expected output? What do you see instead?

The URL should be linked, but it is not.
This functionality is present on Stack Overflow.

What version of the product are you using? On what operating system?
Chrome 11.0.696.71

Please provide any additional information below.

Original issue reported on code.google.com by scott.vi...@gmail.com on 27 May 2011 at 7:28

GoogleCodeExporter commented 8 years ago
Here is a patch for this issue. In the _doAutoLinks function (around line 1167) 
replace this line:

    text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");

with this:

    text = text.replace(/<?((https?|ftp|dict):[^'">\s]+)>?/gi,"<a href=\"$1\">$1</a>");

Original comment by scott.vi...@gmail.com on 15 Jul 2011 at 3:40