From 3bdd9282ce67d1094c36204e77e3f32356a2c059 Mon Sep 17 00:00:00 2001 From: David Waern Date: Fri, 25 Nov 2011 02:16:20 +0100 Subject: Some more changes to test scripts. --- tests/html-tests/copy.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/html-tests/copy.hs') diff --git a/tests/html-tests/copy.hs b/tests/html-tests/copy.hs index fa18fe9c..fe1e5422 100644 --- a/tests/html-tests/copy.hs +++ b/tests/html-tests/copy.hs @@ -5,7 +5,6 @@ import System.Exit import System.Directory import Data.List import Control.Monad -import Text.Regex main = do @@ -27,4 +26,11 @@ copy file = do writeFile new (stripLinks contents) -stripLinks f = subRegex (mkRegexWithOpts "]*>" False False) f "" +stripLinks str = + let prefix = " prefix ++ stripLinks (dropWhile (/= '"') str') + Nothing -> + case str of + [] -> [] + x : xs -> x : stripLinks xs -- cgit v1.2.3