Expand list of recognized unicode spaces (and rewrite for performance)
This commit is contained in:
parent
c7611dfcc6
commit
68e6f02267
|
@ -141,15 +141,9 @@ carriageReturn = do
|
||||||
parseProblemAt pos ErrorC 1017 "Literal carriage return. Run script through tr -d '\\r' ."
|
parseProblemAt pos ErrorC 1017 "Literal carriage return. Run script through tr -d '\\r' ."
|
||||||
return '\r'
|
return '\r'
|
||||||
|
|
||||||
almostSpace =
|
almostSpace = do
|
||||||
choice [
|
parseNote ErrorC 1018 $ "This is a unicode space. Delete and retype it."
|
||||||
check '\xA0' "unicode non-breaking space",
|
oneOf "\xA0\x2002\x2003\x2004\x2005\x2006\x2007\x2008\x2009\x200B\x202F"
|
||||||
check '\x200B' "unicode zerowidth space"
|
|
||||||
]
|
|
||||||
where
|
|
||||||
check c name = do
|
|
||||||
parseNote ErrorC 1018 $ "This is a " ++ name ++ ". Delete and retype it."
|
|
||||||
char c
|
|
||||||
return ' '
|
return ' '
|
||||||
|
|
||||||
--------- Message/position annotation on top of user state
|
--------- Message/position annotation on top of user state
|
||||||
|
|
Loading…
Reference in New Issue