aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2011-01-23 17:01:05 -0500
committerWaylan Limberg <waylan@gmail.com>2011-01-23 17:01:05 -0500
commit07a9ee91135fd731adf6c5e10140b4cf1a935944 (patch)
tree8f161a964e0a2efecc667c22efa88b14d40196f2
parentf57dcb4b241c283fbe32694fa0d6729eaefe3e85 (diff)
parent9fa60ed5f06d58270c0e6804fb39a50b69bedeab (diff)
downloadmarkdown-07a9ee91135fd731adf6c5e10140b4cf1a935944.tar.gz
markdown-07a9ee91135fd731adf6c5e10140b4cf1a935944.tar.bz2
markdown-07a9ee91135fd731adf6c5e10140b4cf1a935944.zip
Merge commit 'refs/merge-requests/11' of git://gitorious.org/python-markdown/mainline into int
-rw-r--r--markdown/extensions/headerid.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py
index e7e8670..5e9793e 100644
--- a/markdown/extensions/headerid.py
+++ b/markdown/extensions/headerid.py
@@ -157,7 +157,7 @@ class HeaderIdProcessor(markdown.blockprocessors.BlockProcessor):
def _create_id(self, header):
""" Return ID from Header text. """
h = ''
- for c in header.lower().replace(' ', '_'):
+ for c in header.lower().replace(' ', self.config['separator'][0]):
if c in ID_CHARS:
h += c
elif c not in punctuation:
@@ -170,7 +170,8 @@ class HeaderIdExtension (markdown.Extension):
# set defaults
self.config = {
'level' : ['1', 'Base level for headers.'],
- 'forceid' : ['True', 'Force all headers to have an id.']
+ 'forceid' : ['True', 'Force all headers to have an id.'],
+ 'separator' : ['_', 'Word separator.'],
}
for key, value in configs: