From 0b8bf13743bccef067b9812949dc97e559dfbaca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 6 Feb 2011 22:55:57 +0200 Subject: [PATCH] nongreedy link parsing --- moin2doku.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moin2doku.py b/moin2doku.py index 25f4b4e..7200d8c 100755 --- a/moin2doku.py +++ b/moin2doku.py @@ -133,7 +133,7 @@ def convert_markup(page, filename): # web link without title ('\[(http[^\s]+)\]', '[[\\1]]'), # web link with title - ('\[(http[^\s]+)\s+(.+)\]', '[[\\1|\\2]]'), + ('\[(http[^\s]+)\s+(.+?)\]', '[[\\1|\\2]]'), ('\["/(.*)"\]', '[['+filename[-1]+':\\1]]'), ('\{{3}', '<'+'code>'), # code open