summaryrefslogtreecommitdiff
path: root/src/GF/UseGrammar/Tokenize.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/UseGrammar/Tokenize.hs')
-rw-r--r--src/GF/UseGrammar/Tokenize.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GF/UseGrammar/Tokenize.hs b/src/GF/UseGrammar/Tokenize.hs
index ac28276f5..b264075ba 100644
--- a/src/GF/UseGrammar/Tokenize.hs
+++ b/src/GF/UseGrammar/Tokenize.hs
@@ -129,6 +129,9 @@ unknown2string isKnown = map mkOne where
mkOne t@(TC s) = if isKnown s then t else mkTL s
mkOne t = t
-lexTextLiteral isKnown = unknown2string isKnown . lexText
+lexTextLiteral isKnown = unknown2string (eitherUpper isKnown) . lexText
lexHaskellLiteral isKnown = unknown2string isKnown . lexHaskell
+eitherUpper isKnown w@(c:cs) = isKnown (toLower c : cs) || isKnown (toUpper c : cs)
+eitherUpper isKnown w = isKnown w
+