summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-11-29 20:37:55 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-11-29 20:37:55 +0000
commita84472e0542e0837d62cb637c2e446c2570d0230 (patch)
tree14125f69218349ff0147218109cbb1975d87fd97 /src/Text/Pandoc
parent80a4a03df7cae09c73453322729653f9bffbdd75 (diff)
Allow _ character in automatically generated identifiers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1635 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Shared.hs2
1 files changed, 1 insertions, 1 deletions
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