Allow . and ~ in header identifiers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1638 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
df0ce7658c
commit
a42703d3c0
2 changed files with 3 additions and 2 deletions
3
README
3
README
|
@ -870,7 +870,8 @@ identifier. This identifier is based on the text of the header. To
|
|||
derive the identifier from the header text,
|
||||
|
||||
- Remove all formatting, links, etc.
|
||||
- Remove all punctuation, except underscores and hyphens.
|
||||
- Remove all punctuation, except underscores, hyphens, periods,
|
||||
and tildes.
|
||||
- Replace all spaces and newlines with hyphens.
|
||||
- Convert all alphabetic characters to lowercase.
|
||||
- Remove everything up to the first letter (identifiers may
|
||||
|
|
|
@ -893,7 +893,7 @@ inlineListToIdentifier' [] = ""
|
|||
inlineListToIdentifier' (x:xs) =
|
||||
xAsText ++ inlineListToIdentifier' xs
|
||||
where xAsText = case x of
|
||||
Str s -> filter (\c -> c `elem` "_-" || 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
|
||||
|
|
Loading…
Add table
Reference in a new issue