aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-12-13 19:22:09 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-12-13 20:03:52 -0800
commitdfbb4d399463ad7bf8911bea03fe1c738900157a (patch)
tree0c3c15d5f6b18a9d33b8611207e2ce4bd0d83269 /src/Text/Pandoc
parent999a4733f30d33a89d8f18d232c871d0e8839492 (diff)
downloadpandoc-dfbb4d399463ad7bf8911bea03fe1c738900157a.tar.gz
Fixed inlineListToIdentifier to treat '\160' as ' '.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Shared.hs4
1 files changed, 3 insertions, 1 deletions
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]