aboutsummaryrefslogtreecommitdiff
path: root/trac2md.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2021-02-14 22:14:27 +0000
committerRob Austein <sra@hactrn.net>2021-02-14 22:14:27 +0000
commiteca811ec09db5be4892461ad46cd44e904025497 (patch)
tree5aa6ebb56d7395df43404ffef63c03bf4dd43368 /trac2md.py
parent462926e6fa3e7a2983a7eb170873fb4444029564 (diff)
Still more borked links
Diffstat (limited to 'trac2md.py')
-rwxr-xr-xtrac2md.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/trac2md.py b/trac2md.py
index 9a41d1c..6645bc7 100755
--- a/trac2md.py
+++ b/trac2md.py
@@ -15,7 +15,7 @@ from datetime import datetime
from urllib.parse import quote
wikilink_1_pattern = re.compile("\[\[(http.*)\]\]|\[(http.*)\]")
-wikilink_2_pattern = re.compile("\[\[([a-zA-Z0-9_]+)\]\]")
+wikilink_2_pattern = re.compile("\[\[(?:wiki:)?([a-zA-Z0-9_]+)\]\]|\[wiki:([a-zA-Z0-9_]+)\]")
strikethrough_pattern = re.compile("~~(.*)~~")
camelcase_pattern = re.compile("!(\w+)")
image_pattern = re.compile("\[\[Image\((.*)\)\]\]")
@@ -91,7 +91,7 @@ def convert_wikilinks_2(line):
''' Convert more wiki links'''
m = wikilink_2_pattern.search(line)
if m:
- text = m.group(1)
+ text = m.group(1) or m.group(2)
if text.lower() == "pageoutline":
mdlink = ""
else: