Development #17131
transformer rst multi ligne la signature de message
Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
22 juin 2017
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
Dans https://bistro.entrouvert.com/question/273/signature-courriel/ :
Dans le restructuredtext, pour forcer une structure avec les lignes imposées il y a une notion de "line blocks", en gros il suffit de préfixer chacune des lignes d'un |
| Ville d'Arles | Tél. 04 90 49 36 36 | www.ville-arles.fr
Je propose ici d'altérer d'appliquer automatiquement un | en début de ligne lors de l'ajout du texte du footer avant la transformation rst (sauf s'il commence déjà par un |).
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a presque 7 ans
Genre :
--- a/wcs/qommon/emails.py +++ b/wcs/qommon/emails.py @@ -113,6 +113,11 @@ def email(subject, mail_body, email_rcpt, replyto = None, bcc = None, if want_html: try: if footer: + if not footer.startswith('|') and '\n' in footer: + # unless the footer text is already formatted like a block + # of lines, add pipes to give it appropriate multilines + # formatting. + footer = '\n'.join(['| ' + x for x in footer.splitlines()]) rst_mail_body = mail_body + '\n\n--------\n\n' + footer else: rst_mail_body = mail_body
Mis à jour par Frédéric Péters il y a presque 7 ans
- Fichier 0001-emails-force-linebreaks-in-email-footer-17131.patch 0001-emails-force-linebreaks-in-email-footer-17131.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
Je me rends compte que j'ai ensuite oublié d'attacher le patch.
Mis à jour par Frédéric Péters il y a presque 7 ans
- Statut changé de En cours à Résolu (à déployer)
commit 042fd9b28a3f9dffc4dba3f2a8dd22f5b38a0f2b Author: Frédéric Péters <fpeters@entrouvert.com> Date: Fri Jun 23 09:33:35 2017 +0200 emails: force linebreaks in email footer (#17131)
Mis à jour par Frédéric Péters il y a plus de 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
emails: force linebreaks in email footer (#17131)