summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redcloth.rb10
-rw-r--r--test/unit/helpers/application_helper_test.rb1
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/redcloth.rb b/lib/redcloth.rb
index c4b504871..ae70db747 100644
--- a/lib/redcloth.rb
+++ b/lib/redcloth.rb
@@ -359,16 +359,16 @@ class RedCloth < String
]
QTAGS = [
- ['**', 'b'],
- ['*', 'strong'],
+ ['**', 'b', :limit],
+ ['*', 'strong', :limit],
['??', 'cite', :limit],
['-', 'del', :limit],
- ['__', 'i'],
+ ['__', 'i', :limit],
['_', 'em', :limit],
['%', 'span', :limit],
['+', 'ins', :limit],
- ['^', 'sup'],
- ['~', 'sub']
+ ['^', 'sup', :limit],
+ ['~', 'sub', :limit]
]
QTAGS.collect! do |rc, ht, rtype|
rcq = Regexp::quote rc
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index 1da25b6fe..0048ce5b8 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -29,6 +29,7 @@ class ApplicationHelperTest < HelperTestCase
def test_auto_links
to_test = {
'http://foo.bar' => '<a class="external" href="http://foo.bar">http://foo.bar</a>',
+ 'http://foo.bar/~user' => '<a class="external" href="http://foo.bar/~user">http://foo.bar/~user</a>',
'http://foo.bar.' => '<a class="external" href="http://foo.bar">http://foo.bar</a>.',
'http://foo.bar/foo.bar#foo.bar.' => '<a class="external" href="http://foo.bar/foo.bar#foo.bar">http://foo.bar/foo.bar#foo.bar</a>.',
'www.foo.bar' => '<a class="external" href="http://www.foo.bar">www.foo.bar</a>',