mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Fix in Prolog output of the atom "'"
This commit is contained in:
@@ -207,7 +207,7 @@ plVar = varPrefix . concatMap changeNonAlphaNum
|
||||
plAtom :: String -> String
|
||||
plAtom "" = "''"
|
||||
plAtom atom@(c:cs) | isAsciiLower c && all isAlphaNumUnderscore cs
|
||||
|| c == '\'' && last cs == '\'' = atom
|
||||
|| c == '\'' && cs /= "" && last cs == '\'' = atom
|
||||
| otherwise = "'" ++ concatMap changeQuote atom ++ "'"
|
||||
where changeQuote '\'' = "\\'"
|
||||
changeQuote c = [c]
|
||||
|
||||
Reference in New Issue
Block a user