-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't override the smart_quotes setting if it was already set #4112
Conversation
This is needed to fix: sphinx-contrib/spelling#1
Merged. Thank you for contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for loop checking language tags should perhaps be executed to turn setting off, if it was on, but languages do not support smart quotes; or to avoid turn setting on if it was not set but language is "blacklisted" (CJK, #4142...)
if tag in smartchars.quotes: | ||
break | ||
else: | ||
self.settings['smart_quotes'] = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tk0miya this may need some revision: if 'smart_quotes'
was in self.settings
and set to True then the for loop and its break and else clauses should arguably be executed, as they check if language supports smart quotes. Currently they are not executed if builder added to environment a 'smart_quotes'
True setting
Also possibly this for loop could be occasion to check case that language is CJK language and then use False as default setting, not True. Relates #4142
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I missed that. Fixed at e03ec5b.
This is needed to fix: sphinx-contrib/spelling#1
Rebase of #4110 onto the stable branch.