git.iko.soy/typeable/pandoc
on master help sign in
Allow . and ~ in header identifiers.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1638 788f1e2b-df1e-0410-8736-df70ead52e1b

commita42703d3c025d4319ce9e16f21d482f9d9cf6e51 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 1 Dec 2009, 07:44 (17 years ago) parentdf0ce76
2 files changed+3−2
README+2−1 src/Text/Pandoc/Shared.hs+1−1
README+2−1
@@ -870,7 +870,8 @@ identifier. This identifier is based on the text of the header. To
870870derive the identifier from the header text,
871871
872872 - Remove all formatting, links, etc.
873− - Remove all punctuation, except underscores and hyphens.
873+ - Remove all punctuation, except underscores, hyphens, periods,
874+ and tildes.
874875 - Replace all spaces and newlines with hyphens.
875876 - Convert all alphabetic characters to lowercase.
876877 - Remove everything up to the first letter (identifiers may
src/Text/Pandoc/Shared.hs+1−1
@@ -893,7 +893,7 @@ inlineListToIdentifier' [] = ""
893893inlineListToIdentifier' (x:xs) =
894894 xAsText ++ inlineListToIdentifier' xs
895895 where xAsText = case x of
896− Str s -> filter (\c -> c `elem` "_-" || not (isPunctuation c)) $
896+ Str s -> filter (\c -> c `elem` "_-.~" || not (isPunctuation c)) $
897897 intercalate "-" $ words $ map toLower s
898898 Emph lst -> inlineListToIdentifier' lst
899899 Strikeout lst -> inlineListToIdentifier' lst