diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-01-29 23:53:50 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-01-29 23:53:50 (GMT) |
commit | c7e907730e98176be0fdd4e484f2a903b4228348 (patch) | |
tree | 21139f5ccad144e7bba3472954d94a28c14bb3d4 | |
parent | 01f868c4040234ed4b1ee7d0e08377a89b928b77 (diff) | |
download | swift-contrib-c7e907730e98176be0fdd4e484f2a903b4228348.zip swift-contrib-c7e907730e98176be0fdd4e484f2a903b4228348.tar.bz2 |
Fix tilde in links
-rw-r--r-- | SwifTools/Linkify.cpp | 2 | ||||
-rw-r--r-- | SwifTools/UnitTest/LinkifyTest.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/SwifTools/Linkify.cpp b/SwifTools/Linkify.cpp index 63f06c8..48162e1 100644 --- a/SwifTools/Linkify.cpp +++ b/SwifTools/Linkify.cpp @@ -4,7 +4,7 @@ namespace Swift { -static const boost::regex linkifyRegexp("(https?://([\\-\\w\\.]+)+(:\\d+)?(/([%\\-\\w/_#\\.\\+]*(\\?\\S+)?)?)?)"); +static const boost::regex linkifyRegexp("(https?://([\\-\\w\\.]+)+(:\\d+)?(/([%~\\-\\w/_#\\.\\+]*(\\?\\S+)?)?)?)"); String Linkify::linkify(const String& input) { return String(boost::regex_replace( diff --git a/SwifTools/UnitTest/LinkifyTest.cpp b/SwifTools/UnitTest/LinkifyTest.cpp index e952585..6e27c2c 100644 --- a/SwifTools/UnitTest/LinkifyTest.cpp +++ b/SwifTools/UnitTest/LinkifyTest.cpp @@ -16,6 +16,7 @@ class LinkifyTest : public CppUnit::TestFixture { CPPUNIT_TEST(testLinkify_HierarchicalResource); CPPUNIT_TEST(testLinkify_Anchor); CPPUNIT_TEST(testLinkify_Plus); + CPPUNIT_TEST(testLinkify_Tilde); CPPUNIT_TEST_SUITE_END(); public: |