comparison piecrust/formatting/hoedownformatter.py @ 1034:96f1e5e377ef

markdown: Use either the `hoedown` or `markdown` config section.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 16 Jan 2018 08:39:08 -0800
parents 0302f690a4c5
children
comparison
equal deleted inserted replaced
1033:57283302b3ee 1034:96f1e5e377ef
28 # show them for the first. If the variable is not set, we're not 28 # show them for the first. If the variable is not set, we're not
29 # baking so do show them either way. 29 # baking so do show them either way.
30 show_warnings = (self.app.config.get('baker/worker_id', 0) == 0) 30 show_warnings = (self.app.config.get('baker/worker_id', 0) == 0)
31 31
32 config = self.app.config.get('hoedown') 32 config = self.app.config.get('hoedown')
33 if config is None:
34 config = self.app.config.get('markdown')
33 if config is None: 35 if config is None:
34 config = {} 36 config = {}
35 elif not isinstance(config, dict): 37 elif not isinstance(config, dict):
36 raise Exception("The `hoedown` configuration setting must be " 38 raise Exception("The `hoedown` configuration setting must be "
37 "a dictionary.") 39 "a dictionary.")