From 106e3cf0daeae469f969e669317c863a56b533b4 Mon Sep 17 00:00:00 2001 From: ross Date: Thu, 13 Jan 2005 14:43:41 +0000 Subject: [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) --- src/HaddockLex.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HaddockLex.x b/src/HaddockLex.x index a9ecc99a..1044d64a 100644 --- a/src/HaddockLex.x +++ b/src/HaddockLex.x @@ -59,7 +59,7 @@ $ident = [$alphanum \'\_\.\!\#\$\%\&\*\+\/\<\=\>\?\@\\\\\^\|\-\~] [\'\`] $ident+ [\'\`] { ident } \\ . { strtoken (TokString . tail) } "&#" $digit+ \; { strtoken $ \s -> TokString [chr (read (init (drop 2 s)))] } - "&#x" $hexdigit+ \; { strtoken $ \s -> case readHex (init (drop 3 s)) of [(n,_)] -> TokString [chr n] } + "&#" [xX] $hexdigit+ \; { strtoken $ \s -> case readHex (init (drop 3 s)) of [(n,_)] -> TokString [chr n] } -- allow special characters through if they don't fit one of the previous -- patterns. [\'\`\<\#\&\\] { strtoken TokString } -- cgit v1.2.3