More descriptive auto-IDs
commit02c2052b2f11514c98bf5580c1d7c58cda55a963
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Fri, 11 Oct 2019 10:09:53 +0000 (11 10:09 +0000)
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Fri, 11 Oct 2019 10:09:53 +0000 (11 10:09 +0000)
tree230fa750031d4d0df8034527475c84d38b9bce9e
parent5cdaf6465ec54ba2363b8328a11185169aa569f3
More descriptive auto-IDs

Generate unique ids adding a running number to
prefixes based on

a) the node "name" (if existing but not unique),
b) the new optional argument "suggested_prefix" (used for toc entries),
c) the tagname of the object (e.g. footnote, citation, footnote-reference,
   system-message, ...)

Advantages:

* Meaningfully named links to ToC entries, footnotes, citations,
  error messages, and sections with duplicate title.
* More stable links (a new footnote does not change backlinks to the ToC, say).

For backwards compatibility, this only applies if `settings.auto_id_prefix`
ends with a percent sign ("%"). This may become the default in the future.

git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8403 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
docutils/docutils/nodes.py
docutils/docutils/transforms/parts.py