|
From: <mi...@us...> - 2019-10-29 22:48:18
|
Revision: 8405
http://sourceforge.net/p/docutils/code/8405
Author: milde
Date: 2019-10-29 22:48:16 +0000 (Tue, 29 Oct 2019)
Log Message:
-----------
Less invasive change-plan for `identifier key` generation.
Do not use `identifier normalization` on the "id_prefix".
This allows users to keep generating identifiers with a prefix
containing capital letters or characters allowed in some output
formats but not in Docutils `identifier keys`.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docs/user/smartquotes.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2019-10-12 20:38:10 UTC (rev 8404)
+++ trunk/docutils/HISTORY.txt 2019-10-29 22:48:16 UTC (rev 8405)
@@ -37,8 +37,7 @@
* docutils/nodes.py
- Speed up Node.next_node().
- - If `auto_id_prefix`_ ends with a "%", this is replaced with the tag
- name.
+ - If `auto_id_prefix`_ ends with "%", this is replaced with the tag name.
- Warn about Node.traverse() returning an iterator instead of a list
in future.
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2019-10-12 20:38:10 UTC (rev 8404)
+++ trunk/docutils/RELEASE-NOTES.txt 2019-10-29 22:48:16 UTC (rev 8405)
@@ -49,18 +49,17 @@
* Remove ``utils.unique_combinations``
(obsoleted by ``itertools.combinations``).
-* The id_prefix_ setting will be prepended to the `reference name`_ *before*
- conversion to an ID. (Currently it is prepended as-is, without checking
- for conformance to Docutils' `ID naming rules`_.) This may change
- generated IDs.
+* If the id_prefix_ setting is non-empty, leading number and hyphen characters
+ will not be stripped from a `reference name`_ during `identifier
+ normalization`_. This may change generated `identifier keys`.
- Example: with ``--id-prefix="DU"``, a section with title "34.
- May" currently gets the ID ``DU-may`` and after the change the ID
- ``du-34-may``.
+ Example: with ``--id-prefix="DU-"``, a section with title "34. May"
+ currently gets the identifier key ``DU-may`` and after the change the
+ identifier key ``DU-34-may``.
* The default value for auto_id_prefix_ will change to "%". This means
auto-generated IDs will use the tag name as prefix. Set auto_id_prefix_ to
- "id" if you want unchanged IDs or to "%" if you want descriptive IDs.
+ "id" if you want unchanged auto-IDs or to "%" if you want descriptive IDs.
* The default HTML writer "html" with frontend ``rst2html.py`` may change
from "html4css1" to "html5".
@@ -76,7 +75,7 @@
.. _auto_id_prefix: docs/user/config.html#auto-id-prefix
.. _rst2html.py: docs/user/tools.html#rst2html-py
.. _reference name: docs/ref/rst/restructuredtext.html#reference-names
-.. _ID naming rules: docs/ref/rst/directives.html#rationale
+.. _identifier normalization: directives.html#identifier-normalization
Release 0.16
============
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2019-10-12 20:38:10 UTC (rev 8404)
+++ trunk/docutils/docs/user/config.txt 2019-10-29 22:48:16 UTC (rev 8405)
@@ -197,13 +197,18 @@
auto_id_prefix
--------------
-Prefix prepended to all auto-generated IDs generated within the
-document, after id_prefix_.
+Prefix prepended to all auto-generated `identifier keys` generated within
+the document, after id_prefix_. Ensure the value conforms to the
+restrictions on identifiers in the output format, as it is not subjected to
+the `identifier normalization`_.
+
A trailing "%" is replaced with the tag name (new in Docutils 0.16).
-Default: "id". (Will be `changed to "%" in future`__.)
+Default: "id" (`will change to "%" in future`__).
Options: ``--auto-id-prefix`` (hidden, intended mainly for programmatic use).
+.. _identifier normalization:
+ ../ref/rst/directives.html#identifier-normalization
__ ../../RELEASE-NOTES.html#future-changes
datestamp
@@ -338,8 +343,10 @@
id_prefix
---------
-Prefix prepended to all IDs generated within the document. See also
-auto_id_prefix_.
+Prefix prepended to all identifier keys generated within the document.
+Ensure the value conforms to the restrictions on identifiers in the output
+format, as it is not subjected to the `identifier normalization`_.
+See also auto_id_prefix_.
Default: "" (empty).
Options: ``--id-prefix`` (hidden, intended mainly for programmatic use).
@@ -703,7 +710,7 @@
New in Docutils 0.10.
.. _SmartQuotes: smartquotes.html
-__ smartquotes.html#localisation
+__ smartquotes.html#localization
.. _quote characters:
http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks
Modified: trunk/docutils/docs/user/smartquotes.txt
===================================================================
--- trunk/docutils/docs/user/smartquotes.txt 2019-10-12 20:38:10 UTC (rev 8404)
+++ trunk/docutils/docs/user/smartquotes.txt 2019-10-29 22:48:16 UTC (rev 8405)
@@ -75,7 +75,7 @@
.. _backslash escape: ../ref/rst/restructuredtext.html#escaping-mechanism
-Localisation
+Localization
============
Quotation marks have a `variety of forms`__ in different languages and
@@ -469,7 +469,7 @@
`Jeremy Hedley`_ and `Charles Wiltgen`_ deserve mention for exemplary beta
testing of the original SmartyPants.
-Internationalisation and adaption to Docutils by Günter Milde.
+Internationalization and adaption to Docutils by Günter Milde.
.. _SmartyPants: http://daringfireball.net/projects/smartypants/
.. _Pyblosxom: http://pyblosxom.bluesock.org/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|