simplify "Simple Footnotes" fragment identifier
authorM. Taylor Saotome-Westlake <[email protected]>
Thu, 22 Feb 2018 00:28:04 +0000 (16:28 -0800)
committerM. Taylor Saotome-Westlake <[email protected]>
Thu, 22 Feb 2018 00:43:22 +0000 (16:43 -0800)
The article slug is already in the URL; repeating it in the fragment is
hideous.

plugins/simple_footnotes.py

index 0ea8383..d6e8810 100644 (file)
@@ -56,7 +56,7 @@ def parse_for_footnotes(article_or_page_generator):
                 if leavealone:
                     continue
                 count += 1
-                fnid = u"sf-%s-%s" % (article.slug, count)
+                fnid = u"note-%s" % (count)
                 fnbackid = u"%s-back" % (fnid,)
                 endnotes.append((footnote, fnid, fnbackid))
                 number = dom.createElement(u"sup")