Commit d7e3c31a authored by alexandre's avatar alexandre

Ajout du filtre de veuves et orphelines au script pour générer le HTML

parent a8bea8bd
......@@ -57,9 +57,4 @@ if __name__ == '__main__':
html = md2html(unicode_content)
args.outfile.write('<!-- Begining of %s" -->\n' % args.infile.name)
args.outfile.write('<article id="%s">\n' % args.infile.name[16:-3])
args.outfile.write(html.encode("utf-8"))
args.outfile.write('\n</article>')
args.outfile.write('\n<!-- End of %s" -->\n\n' % args.infile.name)
......@@ -30,7 +30,7 @@
import codecs
import html5lib
from html5lib_typogrify.french.filters import ellipsis, spaces, dashes
from html5lib_typogrify.french.filters import ellipsis, spaces, dashes, widows_orphans
def fix_french(html):
......@@ -41,6 +41,7 @@ def fix_french(html):
stream = dashes.Filter(stream)
stream = ellipsis.Filter(stream)
stream = spaces.Filter(stream)
stream = widows_orphans.Filter(stream)
serializer = html5lib.serializer.HTMLSerializer(quote_attr_values=True,
alphabetical_attributes=True,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment