moved config to a json, which makes adding more variables easier, but perhaps otherwise adds complexity
This commit is contained in:
@@ -14,8 +14,9 @@ RE_PLAINURL = re.compile(
|
||||
r"(?P<pre>^|\s|\n)(?P<url>https?://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))(?P<post>\s|\n|$)"
|
||||
)
|
||||
|
||||
|
||||
def html(text):
|
||||
text = RE_PLAINURL.sub(r'\g<pre>[\g<url>](\g<url>)\g<post>', text)
|
||||
text = RE_PLAINURL.sub(r"\g<pre>[\g<url>](\g<url>)\g<post>", text)
|
||||
return markdown2.markdown(text)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user