Use SmartyPants to render nice curly quotes in reviews
authorAlex Chan <alex@alexwlchan.net>
Sun, 2 Feb 2020 19:04:38 +0000 (19:04 +0000)
committerAlex Chan <alex@alexwlchan.net>
Sun, 2 Feb 2020 19:04:38 +0000 (19:04 +0000)
scripts/render_html.py

index 0eb5e4d..47cb890 100755 (executable)
@@ -10,6 +10,7 @@ import sys
 import attr
 import frontmatter
 import markdown
+from markdown.extensions.smarty import SmartyExtension
 from jinja2 import Environment, FileSystemLoader, select_autoescape
 
 
@@ -70,7 +71,7 @@ def get_reviews():
 
 
 def render_markdown(text):
-    return markdown.markdown(text)
+    return markdown.markdown(text, extensions=[SmartyExtension()])
 
 
 def render_date(date_value):