git.iko.soy/typeable/pandoc
on master help sign in
Don't allow colon in autogenerated HTML identifiers.

They have a special meaning in XML (e.g. in EPUB).

commit306c4745621a4748fba70c8b029c0cf9d4d7a017 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 4 Jul 2010, 23:26 (16 years ago) parent162b869
1 file changed+2−2
src/Text/Pandoc/Shared.hs+2−2
src/Text/Pandoc/Shared.hs+2−2
@@ -364,11 +364,11 @@ data Element = Blk Block
364364
365365-- | Convert Pandoc inline list to plain text identifier. HTML
366366-- identifiers must start with a letter, and may contain only
367−-- letters, digits, and the characters _-:.
367+-- letters, digits, and the characters _-.
368368inlineListToIdentifier :: [Inline] -> String
369369inlineListToIdentifier =
370370 dropWhile (not . isAlpha) . intercalate "-" . words . map toLower .
371− filter (\c -> isLetter c || isDigit c || c `elem` "_-:. ") .
371+ filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") .
372372 concatMap extractText
373373 where extractText x = case x of
374374 Str s -> s