fix in markdown parsing
@@ -45,9 +45,10 @@ SITE_URL = f"{settings.SITE_DOMAIN}{settings.HTTP_PORT}"
# Biostar patterns
-USER_PATTERN = rec(fr"^http(s)?://{settings.SITE_DOMAIN}:{settings.HTTP_PORT}/accounts/profile/(?P<uid>(\w+))(/)?$")
-POST_TOPLEVEL = rec(fr"^http(s)?://{settings.SITE_DOMAIN}:{settings.HTTP_PORT}/p/(?P<uid>(\w+))(/)?$")
-POST_ANCHOR = rec(fr"^http(s)?://{settings.SITE_DOMAIN}:{settings.HTTP_PORT}/p/\w+//\#(?P<uid>(\w+))(/)?$")
+PORT = ':' + settings.HTTP_PORT if settings.HTTP_PORT else ''
+USER_PATTERN = rec(fr"^http(s)?://{settings.SITE_DOMAIN}{PORT}/accounts/profile/(?P<uid>(\w+))(/)?$")
+POST_TOPLEVEL = rec(fr"^http(s)?://{settings.SITE_DOMAIN}{PORT}/p/(?P<uid>(\w+))(/)?$")
+POST_ANCHOR = rec(fr"^http(s)?://{settings.SITE_DOMAIN}{PORT}/p/\w+//\#(?P<uid>(\w+))(/)?$")
# Match any alphanumeric characters after the @.
# These characters are allowed in handles: _ . -
MENTINONED_USERS = rec(r"(\@(?P<handle>[\w_.-]+))")
