diff options
author | Rob Austein <sra@hactrn.net> | 2021-02-14 22:14:27 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2021-02-14 22:14:27 +0000 |
commit | eca811ec09db5be4892461ad46cd44e904025497 (patch) | |
tree | 5aa6ebb56d7395df43404ffef63c03bf4dd43368 /trac2md.py | |
parent | 462926e6fa3e7a2983a7eb170873fb4444029564 (diff) |
Still more borked links
Diffstat (limited to 'trac2md.py')
-rwxr-xr-x | trac2md.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |