diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-04-01 11:20:30 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-04-01 11:20:30 +0900 |
commit | 8ab06530be89e3f42c43899b43872b0df1dd5a3d (patch) | |
tree | 2c035f673930a0edd531dab6238fccab654dc613 /sphinx/transforms.py | |
parent | 42395a177adaa92c4955248d9b96f337e8923bd8 (diff) | |
download | sphinx-git-8ab06530be89e3f42c43899b43872b0df1dd5a3d.tar.gz |
Fix #2394: Sphinx crashes when html_last_updated_fmt is invalid
Diffstat (limited to 'sphinx/transforms.py')
-rw-r--r-- | sphinx/transforms.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/transforms.py b/sphinx/transforms.py index 583271116..7272d3b19 100644 --- a/sphinx/transforms.py +++ b/sphinx/transforms.py @@ -44,6 +44,7 @@ class DefaultSubstitutions(Transform): default_priority = 210 def apply(self): + env = self.document.settings.env config = self.document.settings.env.config # only handle those not otherwise defined in the document to_handle = default_substitutions - set(self.document.substitution_defs) @@ -54,7 +55,7 @@ class DefaultSubstitutions(Transform): if refname == 'today' and not text: # special handling: can also specify a strftime format text = format_date(config.today_fmt or _('MMMM dd, YYYY'), - language=config.language) + language=config.language, warn=env.warn) ref.replace_self(nodes.Text(text, text)) |