git.iko.soy/typeable/pandoc
on master help sign in
Fixed inlineListToIdentifier to treat '\160' as ' '.
dfbb4d3John MacFarlane
src/Text/Pandoc/Shared.hs+3−1
@@ -382,7 +382,7 @@ inlineListToIdentifier =
382 filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") .
382 filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") .
383 concatMap extractText
383 concatMap extractText
384 where extractText x = case x of
384 where extractText x = case x of
385− Str s -> s
385+ Str s -> map nbspToSp s
386 Emph lst -> concatMap extractText lst
386 Emph lst -> concatMap extractText lst
387 Strikeout lst -> concatMap extractText lst
387 Strikeout lst -> concatMap extractText lst
388 Superscript lst -> concatMap extractText lst
388 Superscript lst -> concatMap extractText lst
@@ -404,6 +404,8 @@ inlineListToIdentifier =
404 Link lst _ -> concatMap extractText lst
404 Link lst _ -> concatMap extractText lst
405 Image lst _ -> concatMap extractText lst
405 Image lst _ -> concatMap extractText lst
406 Note _ -> ""
406 Note _ -> ""
407+ nbspToSp '\160' = ' '
408+ nbspToSp x = x
407
409
408-- | Convert list of Pandoc blocks into (hierarchical) list of Elements
410-- | Convert list of Pandoc blocks into (hierarchical) list of Elements
409hierarchicalize :: [Block] -> [Element]
411hierarchicalize :: [Block] -> [Element]