mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refactor SphinxSmartQuotes: Override smartquotes_action by str value (instaed of property)
This commit is contained in:
parent
bf491cff2f
commit
10b1a2fba2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user