You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- toc.py.old 2011-11-20 20:03:03.000000000 +1100
+++ toc.py 2011-11-20 20:04:22.000000000 +1100
@@ -76,7 +76,7 @@
# Do not override pre-existing ids
if not "id" in c.attrib:
id = self.config["slugify"][0](c.text)
- if id in used_ids:
+ if ( id == '' ) or ( id in used_ids ):
ctr = 1
while "%s_%d" % (id, ctr) in used_ids:
ctr += 1
=== <<< ===
Basically the slugify() method makes an empty slug for non-ascii headings, so we name them as "_%d" % (heading_occurence) then .
The text was updated successfully, but these errors were encountered:
As the code has changed drastically here, your patch will not apply to the current code. In fact, we are now running unicodedata.normalize() on headers in our slugify() function to support non-ascii headers. Therefore, your patch should be unnecessary.
But I am happy to report that the problem (making empty slugs for non-ascii headings) was successfully moved with the code to a new location; as I can not reopen this bug, I will file a new one instead.
A quick hack to support non-ascii headings :
=== diff -u toc.py.old toc.py >>> ===
=== <<< ===
Basically the slugify() method makes an empty slug for non-ascii headings, so we name them as "_%d" % (heading_occurence) then .
The text was updated successfully, but these errors were encountered: