Skip to content

Commit 6b3a105

Browse files
committed
quick and easy fix for #51
1 parent 479d618 commit 6b3a105

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tests/test_github_issues.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,10 @@ def test_github_issue_50():
183183
'final List<List<String>> multipleList = new '
184184
'ArrayList&lt;&gt;();</pre>')
185185
assert result == expect
186+
187+
def test_github_issue_51():
188+
"""Link build with $ sign without "http" prefix broken."""
189+
test = '"$":www.google.com.br'
190+
result = textile.textile(test)
191+
expect = '\t<p><a href="www.google.com.br">www.google.com.br</a></p>'
192+
assert result == expect

textile/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ def _casesdefault(c, pop, popped, url_chars, counts, pre):
920920
text = url
921921
if "://" in text:
922922
text = text.split("://")[1]
923-
else:
923+
elif ":" in text:
924924
text = text.split(":")[1]
925925

926926
text = text.strip()

0 commit comments

Comments
 (0)