From c7e907730e98176be0fdd4e484f2a903b4228348 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Fri, 29 Jan 2010 23:53:50 +0000 Subject: Fix tilde in links 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: -- cgit v0.10.2-6-g49f6