diff --git a/compendium_v2/publishers/helpers.py b/compendium_v2/publishers/helpers.py index 700f42e032b3e88e2076c7fbfd9c4b79fac5077e..f6492d2d93e97db681a6a93b768ef7a70c87f0d1 100644 --- a/compendium_v2/publishers/helpers.py +++ b/compendium_v2/publishers/helpers.py @@ -6,8 +6,10 @@ from sqlalchemy import select from compendium_v2.db import db, model URL_PATTERN = re.compile( - (r'\b(https?://[^\s<>";,(){}\[\]!\\]+|www\.[^\s<>";,(){}\[\]!' - r'\\]+|[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})\b(?=\s|\b|[,!?.;:\\])') + (r'\b(https?://[^\s<>";,(){}\[\]!\\]+' + r'|www\.[^\s<>";,(){}\[\]!\\]+' + r'|[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})' + r'\b(?=\s|\b|[,!?.;:\\])') )