From a84472e0542e0837d62cb637c2e446c2570d0230 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 29 Nov 2009 20:37:55 +0000 Subject: Allow _ character in automatically generated identifiers. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1635 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Shared.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 810911165..a0c45072d 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -891,7 +891,7 @@ inlineListToIdentifier' [] = "" inlineListToIdentifier' (x:xs) = xAsText ++ inlineListToIdentifier' xs where xAsText = case x of - Str s -> filter (\c -> c == '-' || not (isPunctuation c)) $ + Str s -> filter (\c -> c `elem` "_-" || not (isPunctuation c)) $ intercalate "-" $ words $ map toLower s Emph lst -> inlineListToIdentifier' lst Strikeout lst -> inlineListToIdentifier' lst -- cgit v1.2.3