diff options
author | Waylan Limberg <waylan@gmail.com> | 2012-05-24 14:45:08 +0000 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2012-05-24 14:45:08 +0000 |
commit | 396daf31cb0dd4a964ccc784f9715e80381138cf (patch) | |
tree | 9f958361b588300236e912c728bdf28c2007a43f | |
parent | 3ce80f612126621cecf641856efe42d650c90bf3 (diff) | |
download | markdown-396daf31cb0dd4a964ccc784f9715e80381138cf.tar.gz markdown-396daf31cb0dd4a964ccc784f9715e80381138cf.tar.bz2 markdown-396daf31cb0dd4a964ccc784f9715e80381138cf.zip |
Fix #99. Account for empty header IDs when ensuring uniqueness.
-rw-r--r-- | markdown/extensions/headerid.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py index b0e37e2..c99c4bd 100644 --- a/markdown/extensions/headerid.py +++ b/markdown/extensions/headerid.py @@ -97,7 +97,7 @@ def slugify(value, separator): def unique(id, ids): """ Ensure id is unique in set of ids. Append '_1', '_2'... if not """ - while id in ids: + while id in ids or not id: m = IDCOUNT_RE.match(id) if m: id = '%s_%d'% (m.group(1), int(m.group(2))+1) |