From be0df053aff9585b838290d4d6d9bc1716f56b8a Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Wed, 1 Apr 2015 20:20:34 -0400 Subject: Smartypants --- famille.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'famille.py') diff --git a/famille.py b/famille.py index 0520687..c1cedd3 100644 --- a/famille.py +++ b/famille.py @@ -15,6 +15,7 @@ from email import utils from bs4 import BeautifulSoup from flask_mail import Mail, Message import locale +from smartypants import smartypants, Attr locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') @@ -22,7 +23,8 @@ locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') def rstify(string): w = Writer() - result = core.publish_parts(string, writer=w)['fragment'] + result = smartypants(core.publish_parts(string, writer=w)['fragment'], + Attr.set2 | Attr.w) return result # configuration -- cgit v1.2.3-70-g09d2