# HG changeset patch # User Ludovic Chabant # Date 1436502181 25200 # Node ID 7d868afc679123e50bee812c88565de8a3e85060 # Parent 5e902e22805307c051a112999187447deeb4a9a3 rendering: Truly skip formatters that are not enabled. This make `smartypants` work as expected. diff -r 5e902e228053 -r 7d868afc6791 piecrust/formatting/base.py --- a/piecrust/formatting/base.py Thu Jul 09 21:21:40 2015 -0700 +++ b/piecrust/formatting/base.py Thu Jul 09 21:23:01 2015 -0700 @@ -10,6 +10,7 @@ def __init__(self): self.priority = PRIORITY_NORMAL + self.enabled = True def initialize(self, app): self.app = app diff -r 5e902e228053 -r 7d868afc6791 piecrust/rendering.py --- a/piecrust/rendering.py Thu Jul 09 21:21:40 2015 -0700 +++ b/piecrust/rendering.py Thu Jul 09 21:23:01 2015 -0700 @@ -382,6 +382,8 @@ format_count = 0 format_name = format_name or app.config.get('site/default_format') for fmt in app.plugin_loader.getFormatters(): + if not fmt.enabled: + continue if fmt.FORMAT_NAMES is None or format_name in fmt.FORMAT_NAMES: with app.env.timerScope(fmt.__class__.__name__): txt = fmt.render(format_name, txt)