diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2023-02-04 14:13:10 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2023-02-04 14:16:27 +0100 |
| commit | c22714eead558248d42a139635080b4f831e6584 (patch) | |
| tree | fbb538bc359628c4f0e542298764462979686bd6 /helpers.py | |
| parent | d00a74f1103671f43480bd6fef0474d894ea4170 (diff) | |
| download | quatuorbellefeuille.com-c22714eead558248d42a139635080b4f831e6584.tar.xz | |
Use proper ordinals
Diffstat (limited to 'helpers.py')
| -rw-r--r-- | helpers.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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>'), |
