From ef65e1094ab9adec42216ec6cd5f6e96409cc53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 6 Feb 2011 23:42:58 +0200 Subject: [PATCH] fixing wiki: links, monispaced text can be empty --- moin2doku.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/moin2doku.py b/moin2doku.py index f367a22..21868d3 100755 --- a/moin2doku.py +++ b/moin2doku.py @@ -137,10 +137,12 @@ def convert_markup(content, filename): # ('"\]', ']]'), # internal link close # internal links ('\[:(.+)\]', '[[\\1]]'), - # wiki:xxx - ('\[wiki:([^\s]+)\s+(.+)\]', '[[\\1|\\2]]'), # TODO: handle more depths - ('\[\[(.*)/(.*)\]\]', '[[\\1:\\2]]'), + ('\[\[(.*)/(.*)\]\]', 'B[[\\1:\\2]]'), + # wiki:xxx + ('\[wiki:([^\s]+)\s+(.+)]', '[[\\1|\\2]]'), + ('wiki:([^\s]+)\s+(.+)', '[[\\1|\\2]]'), + ('wiki:([^\s]+)', '[[\\1]]'), ('(\[\[.+\]\]).*\]', '\\1'), # web link without title @@ -175,7 +177,7 @@ def convert_markup(content, filename): ('\'{5}(.*)\'{5}', '**//\\1//**'), # bold and italic ('\'{3}(.*)\'{3}', '**\\1**'), # bold ('\'{2}(.*)\'{2}', '//\\1//'), # italic - ('`(.+?)`', "''\\1''"), # monospaced + ('`(.*?)`', "''\\1''"), # monospaced ('(?