git.iko.soy/typeable/pandoc
on master help sign in
Fixed inlineListToIdentifier to treat '\160' as ' '.
commitdfbb4d399463ad7bf8911bea03fe1c738900157a authorJohn MacFarlane <jgm@berkeley.edu> dateMon 13 Dec 2010, 19:22 (16 years ago) parent999a473
1 file changed+3−1
src/Text/Pandoc/Shared.hs+3−1
src/Text/Pandoc/Shared.hs+3−1
@@ -382,7 +382,7 @@ inlineListToIdentifier =
382382 filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") .
383383 concatMap extractText
384384 where extractText x = case x of
385− Str s -> s
385+ Str s -> map nbspToSp s
386386 Emph lst -> concatMap extractText lst
387387 Strikeout lst -> concatMap extractText lst
388388 Superscript lst -> concatMap extractText lst
@@ -404,6 +404,8 @@ inlineListToIdentifier =
404404 Link lst _ -> concatMap extractText lst
405405 Image lst _ -> concatMap extractText lst
406406 Note _ -> ""
407+ nbspToSp '\160' = ' '
408+ nbspToSp x = x
407409
408410-- | Convert list of Pandoc blocks into (hierarchical) list of Elements
409411hierarchicalize :: [Block] -> [Element]