From dfbb4d399463ad7bf8911bea03fe1c738900157a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 13 Dec 2010 19:22:09 -0800 Subject: Fixed inlineListToIdentifier to treat '\160' as ' '. --- src/Text/Pandoc/Shared.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 9878f7c23..ee959931d 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -382,7 +382,7 @@ inlineListToIdentifier = filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") . concatMap extractText where extractText x = case x of - Str s -> s + Str s -> map nbspToSp s Emph lst -> concatMap extractText lst Strikeout lst -> concatMap extractText lst Superscript lst -> concatMap extractText lst @@ -404,6 +404,8 @@ inlineListToIdentifier = Link lst _ -> concatMap extractText lst Image lst _ -> concatMap extractText lst Note _ -> "" + nbspToSp '\160' = ' ' + nbspToSp x = x -- | Convert list of Pandoc blocks into (hierarchical) list of Elements hierarchicalize :: [Block] -> [Element] -- cgit v1.2.3