From e03ec5b9fb6c4ed3e86b1657cac709fd33cbd8d6 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 1 Nov 2017 00:10:33 +0900 Subject: [PATCH] confirm selected language supports smart_quotes or not (refs: #4112) --- sphinx/environment/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py index 553ab794c..9aec464a4 100644 --- a/sphinx/environment/__init__.py +++ b/sphinx/environment/__init__.py @@ -686,11 +686,12 @@ class BuildEnvironment(object): else: self.settings['smart_quotes'] = self.config.smart_quotes - for tag in normalize_language_tag(language): - if tag in smartchars.quotes: - break - else: - self.settings['smart_quotes'] = False + # confirm selected language supports smart_quotes or not + for tag in normalize_language_tag(language): + if tag in smartchars.quotes: + break + else: + self.settings['smart_quotes'] = False docutilsconf = path.join(self.srcdir, 'docutils.conf') # read docutils.conf from source dir, not from current dir