summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-06-13 15:46:50 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-06-13 15:46:50 +0200
commitabc3882695a6888ce7b016c5d1d9b1c5cc22232f (patch)
treeb8e5253135d516c91f4c56b24f55dbb946860986
parent8bba1c26193e704d2d6bb2be9a2fac668b0ea54c (diff)
downloadhaskell-wip/manual-ndecreasing-indentation.tar.gz
Fix "ndecreasingIndentation" in manual (#18116)wip/manual-ndecreasing-indentation
-rw-r--r--docs/users_guide/flags.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py
index fb4592a2b2..2f0bda23b9 100644
--- a/docs/users_guide/flags.py
+++ b/docs/users_guide/flags.py
@@ -255,14 +255,16 @@ class LanguageExtension(GenericFlag):
# Invert the flag
@staticmethod
def _noname(name):
- if name[:2] == "No":
+ # We check isupper() so that NondecreasingIndentation
+ # is not counted as "No-decreasingIndentation"
+ if name[:2] == "No" and name[2].isupper():
return name[2:]
else:
return "No%s" % name
@staticmethod
def _onname(name):
- if name[:2] == "No":
+ if name[:2] == "No" and name[2].isupper():
return name[2:]
else:
return name