Skip to content

Commit

Permalink
Hack to escape colons in User:XXX URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Apr 12, 2016
1 parent fa3c3ed commit 9aa53af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def cleanup_mediawiki(text):
# See https://github.com/jgm/pandoc/issues/2849
if "[[:Category:" in line:
line = line.replace("[[:Category:", "[[Category%3A")
if "[[User:" in line:
line = line.replace("[[User:", "[[User%3A")
new.append(line)
return "\n".join(new), categories

Expand Down

0 comments on commit 9aa53af

Please sign in to comment.