summaryrefslogtreecommitdiff
path: root/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.py')
-rw-r--r--helpers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/helpers.py b/helpers.py
index ab93699..c46e652 100644
--- a/helpers.py
+++ b/helpers.py
@@ -157,7 +157,9 @@ def split_concerts(concerts, threshold):
_TOUCHUPS = (
- (re.compile('([0-9])(st|nd|rd|th|er|ère|nde|ème)'), r'\1<sup>\2</sup>'),
+ # TODO: extend to other ordinals.
+ # Cf. <https://fr.wikipedia.org/wiki/Adjectif_numéral_en_français#Abréviation_des_ordinaux>
+ (re.compile(r'([0-9])(st|nd|rd|th|er|ère|e)\b'), r'\1<sup>\2</sup>'),
(re.compile('<(https?://[^ ]+)>'), r'<a href="\1" target="_blank">\1</a>'),
(re.compile(r'\[([^]]+)\]\((https?://[^ ]+)\)'), r'<a href="\2" target="_blank">\1</a>'),
(re.compile(r'\[([^]]+)\]\((tel:[+\d]+)\)'), r'<a href="\2">\1</a>'),