diff --git a/forum/minimd.py b/forum/minimd.py index 40a80b3..c81addd 100755 --- a/forum/minimd.py +++ b/forum/minimd.py @@ -11,11 +11,11 @@ RE_EM = re.compile(r"\*(.*?)\*") RE_LIST = re.compile(r"(-|[0-9]\.) .*") RE_PLAINURL = re.compile( - r"([ |\n])(https?://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))[^\)]" + r"(?P
^|\s|\n)(?Phttps?://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))(?P \s|\n|$)" ) def html(text): - text = RE_PLAINURL.sub(r'\1[\2](\2)', text) + text = RE_PLAINURL.sub(r'\g [\g](\g )\g ', text) return markdown2.markdown(text) diff --git a/restart.sh b/restart.sh index fc77957..e56c829 100755 --- a/restart.sh +++ b/restart.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash set -e -docker-compose up -d -t 0 --build forum +docker-compose up -d -t 0 --build --force-recreate forum docker-compose logs -f