forked from GitHub/gf-core
Fix in Prolog output of the atom "'"
This commit is contained in:
@@ -207,7 +207,7 @@ plVar = varPrefix . concatMap changeNonAlphaNum
|
|||||||
plAtom :: String -> String
|
plAtom :: String -> String
|
||||||
plAtom "" = "''"
|
plAtom "" = "''"
|
||||||
plAtom atom@(c:cs) | isAsciiLower c && all isAlphaNumUnderscore cs
|
plAtom atom@(c:cs) | isAsciiLower c && all isAlphaNumUnderscore cs
|
||||||
|| c == '\'' && last cs == '\'' = atom
|
|| c == '\'' && cs /= "" && last cs == '\'' = atom
|
||||||
| otherwise = "'" ++ concatMap changeQuote atom ++ "'"
|
| otherwise = "'" ++ concatMap changeQuote atom ++ "'"
|
||||||
where changeQuote '\'' = "\\'"
|
where changeQuote '\'' = "\\'"
|
||||||
changeQuote c = [c]
|
changeQuote c = [c]
|
||||||
|
|||||||
Reference in New Issue
Block a user