improve link management

This commit is contained in:
Vincent Poulailleau 2019-12-03 10:59:08 +01:00
parent 1644f68a7a
commit 053b5c5112

View File

@ -88,6 +88,9 @@ class PoItem:
text = re.sub(
r"\*(.*?)\*", r"« \1 »", text
) # TODO sauf si déjà entre «»
text = re.sub(
r"`(.*?)\s*<((?:http|https|ftp)://.*?)>`_", r"\1 (« \2 »)", text
)
text = re.sub(r"<((?:http|https|ftp)://.*?)>", r"« \1 »", text)
return text