Merge pull request #5765 from tk0miya/refactor_SphinxSmartQuotes

refactor SphinxSmartQuotes: Override smartquotes_action by str value (instaed of property)
This commit is contained in:
Takeshi KOMIYA 2018-12-12 22:17:08 +09:00 committed by GitHub
commit 4b4416834b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,6 +353,9 @@ class SphinxSmartQuotes(SmartQuotes, SphinxTransform):
if not self.is_available():
return
# override default settings with :confval:`smartquotes_action`
self.smartquotes_action = self.config.smartquotes_action
super(SphinxSmartQuotes, self).apply()
def is_available(self):
@ -381,15 +384,6 @@ class SphinxSmartQuotes(SmartQuotes, SphinxTransform):
else:
return False
@property
def smartquotes_action(self):
# type: () -> str
"""A smartquotes_action setting for SmartQuotes.
Users can change this setting through :confval:`smartquotes_action`.
"""
return self.config.smartquotes_action
def get_tokens(self, txtnodes):
# type: (List[nodes.Text]) -> Generator[Tuple[unicode, unicode], None, None]
# A generator that yields ``(texttype, nodetext)`` tuples for a list