summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-06-18 18:55:08 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-06-18 18:55:08 +0000
commite400a59eee150af30ba8d4eda7d14656b92c4cc1 (patch)
tree630b45123719f27a3c5ac3781620c82502ae73ef /docutils
parent0f307e0f38576b464a1d93034f51f11938e4067a (diff)
downloaddocutils-e400a59eee150af30ba8d4eda7d14656b92c4cc1.tar.gz
Change default value for the "auto_id_prefix" setting to "%".
Auto-generated IDs use the tag name as prefix. Set auto_id_prefix_ to "id" if you want unchanged auto-IDs. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8771 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
-rw-r--r--docutils/HISTORY.txt15
-rw-r--r--docutils/RELEASE-NOTES.txt23
-rw-r--r--docutils/docs/user/config.txt2
-rw-r--r--docutils/docutils/frontend.py2
-rw-r--r--docutils/test/functional/expected/odt_footnotes.odtbin8831 -> 8828 bytes
-rwxr-xr-xdocutils/test/test_nodes.py3
-rwxr-xr-xdocutils/test/test_parsers/test_recommonmark/test_targets.py4
-rw-r--r--docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py36
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_citations.py2
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_definition_lists.py44
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_include.py32
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py4
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_replace.py8
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_role.py8
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_tables.py8
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_east_asian_text.py4
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_field_lists.py4
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_footnotes.py84
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_inline_markup.py70
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_interpreted.py36
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_line_blocks.py20
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_section_headers.py10
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_substitutions.py2
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_targets.py79
-rwxr-xr-xdocutils/test/test_publisher.py8
-rwxr-xr-xdocutils/test/test_readers/test_pep/test_inline_markup.py4
-rwxr-xr-xdocutils/test/test_transforms/test_contents.py70
-rwxr-xr-xdocutils/test/test_transforms/test_footnotes.py162
-rwxr-xr-xdocutils/test/test_transforms/test_hyperlinks.py110
-rwxr-xr-xdocutils/test/test_transforms/test_messages.py4
-rwxr-xr-xdocutils/test/test_transforms/test_peps.py6
-rwxr-xr-xdocutils/test/test_transforms/test_sectnum.py16
-rw-r--r--docutils/test/test_transforms/test_smartquotes.py4
-rw-r--r--docutils/test/test_transforms/test_substitution_expansion_length_limit.py4
-rwxr-xr-xdocutils/test/test_transforms/test_substitutions.py24
-rwxr-xr-xdocutils/test/test_transforms/test_target_notes.py8
-rwxr-xr-xdocutils/test/test_writers/test_latex2e.py6
37 files changed, 466 insertions, 460 deletions
diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt
index f67f42d03..746279381 100644
--- a/docutils/HISTORY.txt
+++ b/docutils/HISTORY.txt
@@ -14,17 +14,22 @@
Changes Since 0.17.1
====================
+* docutils/frontend.py
+
+ - The default value for the "auto_id_prefix" setting changed to "%":
+ auto-generated IDs use the tag name as prefix.
+
* docutils/nodes.py
- Make meta__ a standard Docutils doctree node. Writers may ignore
"meta" nodes if they are not supported by the output format.
- - ``Node.traverse()`` returns an iterator instead of a list.
-
- - document.make_id(): Keep leading number and hyphen characters from `name`
- if the id_prefix setting is non-empty.
+ __ docs/ref/doctree.html#meta
+
+ - document.make_id(): Keep leading number and hyphen characters
+ from `name` if the id_prefix setting is non-empty.
- __ docs/ref/doctree.html#meta
+ - ``Node.traverse()`` returns an iterator instead of a list.
* docutils/parsers/rst/directives/html.py
diff --git a/docutils/RELEASE-NOTES.txt b/docutils/RELEASE-NOTES.txt
index 509317df4..48d3d9836 100644
--- a/docutils/RELEASE-NOTES.txt
+++ b/docutils/RELEASE-NOTES.txt
@@ -42,11 +42,6 @@ Future changes
we store the null-escaped text in Text nodes since 0.16 so there is no
additional information in the rawsource.
-* 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 auto-IDs or to "%" if you want the new
- feature already in 0.17.
-
* The default HTML writer "html" with frontend ``rst2html.py`` may change
from "html4css1" to "html5".
@@ -60,8 +55,6 @@ Future changes
* The html_writer_ option of the ``buildhtml.py`` application is
obsoleted by ``--writer`` and will be removed in future.
-.. _id_prefix: docs/user/config.html#id-prefix
-.. _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
.. _html_writer: docs/user/config.html#html-writer
@@ -77,9 +70,14 @@ Release 0.18.dev
characters will not be stripped from a `reference name`_ during
`identifier normalization`_.
- 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``.
+ 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 the auto_id_prefix_ setting changed to "%":
+ use the tag name as prefix for auto-generated IDs.
+ Set auto_id_prefix_ to "id" if you want unchanged auto-IDs.
HTML5:
Write footnote brackets and field term colons to HTML, so that they
@@ -93,8 +91,6 @@ Release 0.18.dev
* Make meta__ a standard Docutils doctree node.
- __ docs/ref/doctree.html#meta
-
* Removed files:
- ``iepngfix.htc`` and ``blank.gif`` (IEĀ 6 workaround for `s5_html`).
@@ -104,8 +100,11 @@ Release 0.18.dev
* Various bugfixes and improvements (see HISTORY_).
+__ docs/ref/doctree.html#meta
.. _identifier normalization:
docs/ref/rst/directives.html#identifier-normalization
+.. _id_prefix: docs/user/config.html#id-prefix
+.. _auto_id_prefix: docs/user/config.html#auto-id-prefix
Release 0.17.1 (2021-04-16)
diff --git a/docutils/docs/user/config.txt b/docutils/docs/user/config.txt
index 4beaa97de..f43b859ce 100644
--- a/docutils/docs/user/config.txt
+++ b/docutils/docs/user/config.txt
@@ -210,7 +210,7 @@ the `identifier normalization`_.
A trailing "%" is replaced with the tag name (new in Docutils 0.16).
-Default: "id" (`will change to "%" in future`__).
+Default: "%" (changed in 0.18 from "id").
Option: ``--auto-id-prefix`` (hidden, intended mainly for programmatic use).
.. _identifier normalization:
diff --git a/docutils/docutils/frontend.py b/docutils/docutils/frontend.py
index bb084d0c6..1c64340a8 100644
--- a/docutils/docutils/frontend.py
+++ b/docutils/docutils/frontend.py
@@ -556,7 +556,7 @@ class OptionParser(optparse.OptionParser, docutils.SettingsSpec):
['--help', '-h'], {'action': 'help'}),
# Typically not useful for non-programmatical use:
(SUPPRESS_HELP, ['--id-prefix'], {'default': ''}),
- (SUPPRESS_HELP, ['--auto-id-prefix'], {'default': 'id'}),
+ (SUPPRESS_HELP, ['--auto-id-prefix'], {'default': '%'}),
# Hidden options, for development use only:
(SUPPRESS_HELP, ['--dump-settings'], {'action': 'store_true'}),
(SUPPRESS_HELP, ['--dump-internals'], {'action': 'store_true'}),
diff --git a/docutils/test/functional/expected/odt_footnotes.odt b/docutils/test/functional/expected/odt_footnotes.odt
index 71da77a58..9d86c2d8a 100644
--- a/docutils/test/functional/expected/odt_footnotes.odt
+++ b/docutils/test/functional/expected/odt_footnotes.odt
Binary files differ
diff --git a/docutils/test/test_nodes.py b/docutils/test/test_nodes.py
index 09637d623..a32f3b1de 100755
--- a/docutils/test/test_nodes.py
+++ b/docutils/test/test_nodes.py
@@ -686,7 +686,8 @@ class SetIdTests(unittest.TestCase):
for element in self.elements:
self.document.set_id(element)
ids = [element['ids'] for element in self.elements]
- self.assertEqual(ids, [['test'], ['id1'], ['id2'], ['id3']])
+ self.assertEqual(ids, [['test'], ['section-1'],
+ ['test-1'], ['footnote-1']])
def test_set_id_custom(self):
# Custom prefixes.
diff --git a/docutils/test/test_parsers/test_recommonmark/test_targets.py b/docutils/test/test_parsers/test_recommonmark/test_targets.py
index 166b3ffb3..11f3b550e 100755
--- a/docutils/test/test_parsers/test_recommonmark/test_targets.py
+++ b/docutils/test/test_parsers/test_recommonmark/test_targets.py
@@ -107,10 +107,10 @@ Paragraph.
Title
<paragraph>
Paragraph.
- <section dupnames="title" ids="id1">
+ <section dupnames="title" ids="title-1">
<title>
Title
- <system_message backrefs="id1" level="1" line="8" source="test data" type="INFO">
+ <system_message backrefs="title-1" level="1" line="8" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "title".
<paragraph>
diff --git a/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py b/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py
index 145d5e996..2a9dd0573 100644
--- a/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py
+++ b/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py
@@ -114,20 +114,20 @@ Also *this**.
(escaped; whitespace before end-string).
<paragraph>
However, '
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
args' triggers a warning.
- <system_message backrefs="id2" ids="id1" level="2" line="15" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="15" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
<paragraph>
Also \n\
<emphasis>
this
- <problematic ids="id4" refid="id3">
+ <problematic ids="problematic-2" refid="system-message-2">
*
.
- <system_message backrefs="id4" ids="id3" level="2" line="17" source="test data" type="WARNING">
+ <system_message backrefs="problematic-2" ids="system-message-2" level="2" line="17" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
"""],
@@ -214,10 +214,10 @@ With simple-inline-markup, this is ```interpreted text``` in backquotes!
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
``
literal without closing backquotes
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline literal start-string without end-string.
"""],
@@ -328,20 +328,20 @@ Adjacent footnote refs are possible with simple-inline-markup:
<document source="test data">
<paragraph>
Adjacent footnote refs are possible with simple-inline-markup:
- <footnote_reference auto="*" ids="id1">
- <footnote_reference auto="1" ids="id2" refname="label">
+ <footnote_reference auto="*" ids="footnote-reference-1">
+ <footnote_reference auto="1" ids="footnote-reference-2" refname="label">
\n\
- <footnote_reference auto="1" ids="id3">
- <footnote_reference ids="id4" refname="2">
+ <footnote_reference auto="1" ids="footnote-reference-3">
+ <footnote_reference ids="footnote-reference-4" refname="2">
2
\n\
- <footnote_reference ids="id5" refname="1">
+ <footnote_reference ids="footnote-reference-5" refname="1">
1
- <footnote_reference auto="*" ids="id6">
- <footnote auto="1" ids="id7">
+ <footnote_reference auto="*" ids="footnote-reference-6">
+ <footnote auto="1" ids="footnote-1">
<paragraph>
test1
- <footnote auto="*" ids="id8">
+ <footnote auto="*" ids="footnote-2">
<paragraph>
test2
"""],
@@ -356,9 +356,9 @@ Adjacent citation refs are possible with simple-inline-markup:
<document source="test data">
<paragraph>
Adjacent citation refs are possible with simple-inline-markup:
- <citation_reference ids="id1" refname="citation">
+ <citation_reference ids="citation-reference-1" refname="citation">
citation
- <citation_reference ids="id2" refname="cit1">
+ <citation_reference ids="citation-reference-2" refname="cit1">
CIT1
"""],
]
@@ -399,7 +399,7 @@ http://example.com/rST_for_all.html
<paragraph>
<reference refuri="http://example.com/*content">
http://example.com/*content
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
/whatever
<reference refuri="http://example.com/">
@@ -407,7 +407,7 @@ http://example.com/rST_for_all.html
<reference name="rST_for" refname="rst_for">
rST_for
all.html
- <system_message backrefs="id2" ids="id1" level="2" line="8" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="8" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_citations.py b/docutils/test/test_parsers/test_rst/test_citations.py
index f57a06b9c..d4f433c27 100755
--- a/docutils/test/test_parsers/test_rst/test_citations.py
+++ b/docutils/test/test_parsers/test_rst/test_citations.py
@@ -156,7 +156,7 @@ isolated internals : ``.-_``.
citation.withdot
<paragraph>
one dot
- <citation ids="id1" names="citation-withdot">
+ <citation ids="citation-withdot-1" names="citation-withdot">
<label>
citation-withdot
<paragraph>
diff --git a/docutils/test/test_parsers/test_rst/test_definition_lists.py b/docutils/test/test_parsers/test_rst/test_definition_lists.py
index e520eebe6..50c37c2d5 100755
--- a/docutils/test/test_parsers/test_rst/test_definition_lists.py
+++ b/docutils/test/test_parsers/test_rst/test_definition_lists.py
@@ -299,75 +299,75 @@ Term `with *inline ``text **errors : classifier `with *errors ``too
<definition_list_item>
<term>
Term \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
`
with \n\
- <problematic ids="id4" refid="id3">
+ <problematic ids="problematic-2" refid="system-message-2">
*
inline \n\
- <problematic ids="id6" refid="id5">
+ <problematic ids="problematic-3" refid="system-message-3">
``
text \n\
- <problematic ids="id8" refid="id7">
+ <problematic ids="problematic-4" refid="system-message-4">
**
errors
<classifier>
classifier \n\
- <problematic ids="id10" refid="id9">
+ <problematic ids="problematic-5" refid="system-message-5">
`
with \n\
- <problematic ids="id12" refid="id11">
+ <problematic ids="problematic-6" refid="system-message-6">
*
errors \n\
- <problematic ids="id14" refid="id13">
+ <problematic ids="problematic-7" refid="system-message-7">
``
too
<definition>
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
- <system_message backrefs="id4" ids="id3" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-2" ids="system-message-2" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
- <system_message backrefs="id6" ids="id5" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-3" ids="system-message-3" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline literal start-string without end-string.
- <system_message backrefs="id8" ids="id7" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-4" ids="system-message-4" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline strong start-string without end-string.
- <system_message backrefs="id10" ids="id9" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-5" ids="system-message-5" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
- <system_message backrefs="id12" ids="id11" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-6" ids="system-message-6" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
- <system_message backrefs="id14" ids="id13" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-7" ids="system-message-7" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline literal start-string without end-string.
<paragraph>
Definition \n\
- <problematic ids="id16" refid="id15">
+ <problematic ids="problematic-8" refid="system-message-8">
`
with \n\
- <problematic ids="id18" refid="id17">
+ <problematic ids="problematic-9" refid="system-message-9">
*
inline \n\
- <problematic ids="id20" refid="id19">
+ <problematic ids="problematic-10" refid="system-message-10">
``
text \n\
- <problematic ids="id22" refid="id21">
+ <problematic ids="problematic-11" refid="system-message-11">
**
markup errors.
- <system_message backrefs="id16" ids="id15" level="2" line="2" source="test data" type="WARNING">
+ <system_message backrefs="problematic-8" ids="system-message-8" level="2" line="2" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
- <system_message backrefs="id18" ids="id17" level="2" line="2" source="test data" type="WARNING">
+ <system_message backrefs="problematic-9" ids="system-message-9" level="2" line="2" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
- <system_message backrefs="id20" ids="id19" level="2" line="2" source="test data" type="WARNING">
+ <system_message backrefs="problematic-10" ids="system-message-10" level="2" line="2" source="test data" type="WARNING">
<paragraph>
Inline literal start-string without end-string.
- <system_message backrefs="id22" ids="id21" level="2" line="2" source="test data" type="WARNING">
+ <system_message backrefs="problematic-11" ids="system-message-11" level="2" line="2" source="test data" type="WARNING">
<paragraph>
Inline strong start-string without end-string.
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_include.py b/docutils/test/test_parsers/test_rst/test_directives/test_include.py
index 443b696a6..b9a1fbd77 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_include.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_include.py
@@ -307,10 +307,10 @@ A paragraph.
<literal>
test_include.py
.
- <section dupnames="inclusion\\ 1" ids="id1">
+ <section dupnames="inclusion\\ 1" ids="inclusion-1-1">
<title>
Inclusion 1
- <system_message backrefs="id1" level="1" line="2" source="%s" type="INFO">
+ <system_message backrefs="inclusion-1-1" level="1" line="2" source="%s" type="INFO">
<paragraph>
Duplicate implicit target name: "inclusion 1".
<paragraph>
@@ -347,10 +347,10 @@ A paragraph.
test_include.py
.
<transition>
- <section dupnames="inclusion\\ 1" ids="id1">
+ <section dupnames="inclusion\\ 1" ids="inclusion-1-1">
<title>
Inclusion 1
- <system_message backrefs="id1" level="1" line="2" source="%s" type="INFO">
+ <system_message backrefs="inclusion-1-1" level="1" line="2" source="%s" type="INFO">
<paragraph>
Duplicate implicit target name: "inclusion 1".
<paragraph>
@@ -551,10 +551,10 @@ Testing errors in included file:
Block quote ends without a blank line; unexpected unindent.
<paragraph>
error
- <section dupnames="hi" ids="id1">
+ <section dupnames="hi" ids="hi-1">
<title>
hi
- <system_message backrefs="id1" level="1" line="10" source="%(source)s" type="INFO">
+ <system_message backrefs="hi-1" level="1" line="10" source="%(source)s" type="INFO">
<paragraph>
Duplicate implicit target name: "hi".
<system_message level="4" line="12" source="%(source)s" type="SEVERE">
@@ -698,39 +698,39 @@ Testing errors in included file:
<paragraph>
$ with inconsistent quoting.
<paragraph>
- <problematic ids="id3" refid="id2">
+ <problematic ids="problematic-1" refid="system-message-1">
:unknown-role:`role`
\n\
and \n\
- <problematic ids="id5" refid="id4">
+ <problematic ids="problematic-2" refid="system-message-2">
*
unbalanced
- <problematic ids="id7" refid="id6">
+ <problematic ids="problematic-3" refid="system-message-3">
`
inline
- <problematic ids="id9" refid="id8">
+ <problematic ids="problematic-4" refid="system-message-4">
**
markup
<system_message level="1" line="63" source="%(source)s" type="INFO">
<paragraph>
No role entry for "unknown-role" in module "docutils.parsers.rst.languages.en".
Trying "unknown-role" as canonical role name.
- <system_message backrefs="id3" ids="id2" level="3" line="63" source="%(source)s" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="63" source="%(source)s" type="ERROR">
<paragraph>
Unknown interpreted text role "unknown-role".
- <system_message backrefs="id5" ids="id4" level="2" line="63" source="%(source)s" type="WARNING">
+ <system_message backrefs="problematic-2" ids="system-message-2" level="2" line="63" source="%(source)s" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
- <system_message backrefs="id7" ids="id6" level="2" line="63" source="%(source)s" type="WARNING">
+ <system_message backrefs="problematic-3" ids="system-message-3" level="2" line="63" source="%(source)s" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
- <system_message backrefs="id9" ids="id8" level="2" line="63" source="%(source)s" type="WARNING">
+ <system_message backrefs="problematic-4" ids="system-message-4" level="2" line="63" source="%(source)s" type="WARNING">
<paragraph>
Inline strong start-string without end-string.
<paragraph>
- <problematic ids="id11" refid="id10">
+ <problematic ids="problematic-5" refid="system-message-5">
:PEP:`-1`
- <system_message backrefs="id11" ids="id10" level="3" line="68" source="%(source)s" type="ERROR">
+ <system_message backrefs="problematic-5" ids="system-message-5" level="3" line="68" source="%(source)s" type="ERROR">
<paragraph>
PEP number must be a number from 0 to 9999; "-1" is invalid.
<system_message level="1" line="66" source="%(source)s" type="INFO">
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py b/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py
index 42cd5f9bc..315899fb0 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py
@@ -67,13 +67,13 @@ totest['line_blocks'] = [
<line_block>
<line>
Inline markup \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
may not span
<line_block>
<line>
multiple lines* of a line block.
- <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="3" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_replace.py b/docutils/test/test_parsers/test_rst/test_directives/test_replace.py
index 429082b33..d0fcaf980 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_replace.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_replace.py
@@ -101,20 +101,20 @@ I recommend you try |Python|_.
""",
"""\
<document source="test data">
- <system_message ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
- <system_message ids="id3" level="2" line="1" source="test data" type="WARNING">
+ <system_message ids="system-message-2" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline strong start-string without end-string.
- <system_message ids="id5" level="2" line="1" source="test data" type="WARNING">
+ <system_message ids="system-message-3" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline literal start-string without end-string.
<system_message level="3" line="1" source="test data" type="ERROR">
<paragraph>
Substitution definition contains illegal element <problematic>:
<literal_block xml:space="preserve">
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
<literal_block xml:space="preserve">
.. |name| replace:: *error in **inline ``markup
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_role.py b/docutils/test/test_parsers/test_rst/test_directives/test_role.py
index da9c49e3b..f5b769806 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_role.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_role.py
@@ -65,14 +65,14 @@ Now that it's defined, :custom:`interpreted` works.
<document source="test data">
<paragraph>
Must define \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:custom:`interpreted`
before using it.
<system_message level="1" line="1" source="test data" type="INFO">
<paragraph>
No role entry for "custom" in module "docutils.parsers.rst.languages.en".
Trying "custom" as canonical role name.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Unknown interpreted text role "custom".
<paragraph>
@@ -263,10 +263,10 @@ Can't use the :raw:`role` directly.
<document source="test data">
<paragraph>
Can't use the \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:raw:`role`
directly.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
No format (Writer name) is associated with this role: "raw".
The "raw" role cannot be used directly.
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
index eb57e3be6..07be0122f 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
@@ -155,7 +155,7 @@ totest['table'] = [
<table>
<title>
title with an \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
error
<tgroup cols="2">
@@ -169,7 +169,7 @@ totest['table'] = [
<entry>
<paragraph>
table
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
"""],
@@ -766,7 +766,7 @@ u"""\
<table>
<title>
error in the \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
title
<tgroup cols="3">
@@ -784,7 +784,7 @@ u"""\
<entry>
<paragraph>
data
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_east_asian_text.py b/docutils/test/test_parsers/test_rst/test_east_asian_text.py
index 0646191c6..6215ae7d3 100755
--- a/docutils/test/test_parsers/test_rst/test_east_asian_text.py
+++ b/docutils/test/test_parsers/test_rst/test_east_asian_text.py
@@ -39,10 +39,10 @@ totest['double-width'] = [
""",
u"""\
<document source="test data">
- <section ids="id1" names="ć‚æć‚¤ćƒˆćƒ«1">
+ <section ids="section-1" names="ć‚æć‚¤ćƒˆćƒ«1">
<title>
ć‚æć‚¤ćƒˆćƒ«1
- <section ids="id2" names="ć‚æć‚¤ćƒˆćƒ«2">
+ <section ids="section-2" names="ć‚æć‚¤ćƒˆćƒ«2">
<title>
ć‚æć‚¤ćƒˆćƒ«2
<system_message level="2" line="5" source="test data" type="WARNING">
diff --git a/docutils/test/test_parsers/test_rst/test_field_lists.py b/docutils/test/test_parsers/test_rst/test_field_lists.py
index c9b6829e6..bdf885898 100755
--- a/docutils/test/test_parsers/test_rst/test_field_lists.py
+++ b/docutils/test/test_parsers/test_rst/test_field_lists.py
@@ -446,11 +446,11 @@ Nested field lists on one line:
<field>
<field_name>
Field name with \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
bad inline markup
<field_body>
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
<paragraph>
diff --git a/docutils/test/test_parsers/test_rst/test_footnotes.py b/docutils/test/test_parsers/test_rst/test_footnotes.py
index 219f153ce..2bb8da5f3 100755
--- a/docutils/test/test_parsers/test_rst/test_footnotes.py
+++ b/docutils/test/test_parsers/test_rst/test_footnotes.py
@@ -27,7 +27,7 @@ totest['footnotes'] = [
""",
"""\
<document source="test data">
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
@@ -39,7 +39,7 @@ totest['footnotes'] = [
""",
"""\
<document source="test data">
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
@@ -55,13 +55,13 @@ totest['footnotes'] = [
""",
"""\
<document source="test data">
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
This is a footnote
on multiple lines with more space.
- <footnote ids="id2" names="2">
+ <footnote ids="footnote-2" names="2">
<label>
2
<paragraph>
@@ -75,7 +75,7 @@ totest['footnotes'] = [
""",
"""\
<document source="test data">
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
@@ -89,7 +89,7 @@ That was an empty footnote.
""",
"""\
<document source="test data">
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
@@ -101,7 +101,7 @@ No blank line.
""",
"""\
<document source="test data">
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<system_message level="2" line="2" source="test data" type="WARNING">
@@ -126,21 +126,21 @@ totest['auto_numbered_footnotes'] = [
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="1" ids="id1">
+ <footnote_reference auto="1" ids="footnote-reference-1">
is the first auto-numbered footnote reference.
- <footnote_reference auto="1" ids="id2">
+ <footnote_reference auto="1" ids="footnote-reference-2">
is the second auto-numbered footnote reference.
- <footnote auto="1" ids="id3">
+ <footnote auto="1" ids="footnote-1">
<paragraph>
Auto-numbered footnote 1.
- <footnote auto="1" ids="id4">
+ <footnote auto="1" ids="footnote-2">
<paragraph>
Auto-numbered footnote 2.
- <footnote auto="1" ids="id5">
+ <footnote auto="1" ids="footnote-3">
<paragraph>
Auto-numbered footnote 3.
<paragraph>
- <footnote_reference auto="1" ids="id6">
+ <footnote_reference auto="1" ids="footnote-reference-3">
is the third auto-numbered footnote reference.
"""],
["""\
@@ -160,7 +160,7 @@ the footnotes: first_, second_, third_.
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="1" ids="id1" refname="third">
+ <footnote_reference auto="1" ids="footnote-reference-1" refname="third">
is a reference to the third auto-numbered footnote.
<footnote auto="1" ids="first" names="first">
<paragraph>
@@ -172,11 +172,11 @@ the footnotes: first_, second_, third_.
<paragraph>
Third auto-numbered footnote.
<paragraph>
- <footnote_reference auto="1" ids="id2" refname="second">
+ <footnote_reference auto="1" ids="footnote-reference-2" refname="second">
is a reference to the second auto-numbered footnote.
- <footnote_reference auto="1" ids="id3" refname="first">
+ <footnote_reference auto="1" ids="footnote-reference-3" refname="first">
is a reference to the first auto-numbered footnote.
- <footnote_reference auto="1" ids="id4" refname="third">
+ <footnote_reference auto="1" ids="footnote-reference-4" refname="third">
is another reference to the third auto-numbered footnote.
<paragraph>
Here are some internal cross-references to the targets generated by
@@ -210,25 +210,25 @@ Mixed anonymous and labelled auto-numbered footnotes:
<paragraph>
Mixed anonymous and labelled auto-numbered footnotes:
<paragraph>
- <footnote_reference auto="1" ids="id1" refname="four">
+ <footnote_reference auto="1" ids="footnote-reference-1" refname="four">
should be 4, \n\
- <footnote_reference auto="1" ids="id2">
+ <footnote_reference auto="1" ids="footnote-reference-2">
should be 1,
- <footnote_reference auto="1" ids="id3">
+ <footnote_reference auto="1" ids="footnote-reference-3">
should be 3, \n\
- <footnote_reference auto="1" ids="id4">
+ <footnote_reference auto="1" ids="footnote-reference-4">
is one too many,
- <footnote_reference auto="1" ids="id5" refname="two">
+ <footnote_reference auto="1" ids="footnote-reference-5" refname="two">
should be 2, and \n\
- <footnote_reference auto="1" ids="id6" refname="six">
+ <footnote_reference auto="1" ids="footnote-reference-6" refname="six">
doesn't exist.
- <footnote auto="1" ids="id7">
+ <footnote auto="1" ids="footnote-1">
<paragraph>
Auto-numbered footnote 1.
<footnote auto="1" ids="two" names="two">
<paragraph>
Auto-numbered footnote 2.
- <footnote auto="1" ids="id8">
+ <footnote auto="1" ids="footnote-2">
<paragraph>
Auto-numbered footnote 3.
<footnote auto="1" ids="four" names="four">
@@ -237,8 +237,8 @@ Mixed anonymous and labelled auto-numbered footnotes:
<footnote auto="1" dupnames="five" ids="five">
<paragraph>
Auto-numbered footnote 5.
- <footnote auto="1" dupnames="five" ids="id9">
- <system_message backrefs="id9" level="2" line="12" source="test data" type="WARNING">
+ <footnote auto="1" dupnames="five" ids="five-1">
+ <system_message backrefs="five-1" level="2" line="12" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "five".
<paragraph>
@@ -267,36 +267,36 @@ and labelled auto-numbered footnotes:
Mixed manually-numbered, anonymous auto-numbered,
and labelled auto-numbered footnotes:
<paragraph>
- <footnote_reference auto="1" ids="id1" refname="four">
+ <footnote_reference auto="1" ids="footnote-reference-1" refname="four">
should be 4, \n\
- <footnote_reference auto="1" ids="id2">
+ <footnote_reference auto="1" ids="footnote-reference-2">
should be 2,
- <footnote_reference ids="id3" refname="1">
+ <footnote_reference ids="footnote-reference-3" refname="1">
1
is 1, \n\
- <footnote_reference ids="id4" refname="3">
+ <footnote_reference ids="footnote-reference-4" refname="3">
3
is 3,
- <footnote_reference auto="1" ids="id5">
+ <footnote_reference auto="1" ids="footnote-reference-5">
should be 6, \n\
- <footnote_reference auto="1" ids="id6">
+ <footnote_reference auto="1" ids="footnote-reference-6">
is one too many,
- <footnote_reference auto="1" ids="id7" refname="five">
+ <footnote_reference auto="1" ids="footnote-reference-7" refname="five">
should be 5, and \n\
- <footnote_reference auto="1" ids="id8" refname="six">
+ <footnote_reference auto="1" ids="footnote-reference-8" refname="six">
doesn't exist.
- <footnote ids="id9" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
Manually-numbered footnote 1.
- <footnote auto="1" ids="id10">
+ <footnote auto="1" ids="footnote-2">
<paragraph>
Auto-numbered footnote 2.
<footnote auto="1" ids="four" names="four">
<paragraph>
Auto-numbered footnote 4.
- <footnote ids="id11" names="3">
+ <footnote ids="footnote-3" names="3">
<label>
3
<paragraph>
@@ -304,13 +304,13 @@ and labelled auto-numbered footnotes:
<footnote auto="1" dupnames="five" ids="five">
<paragraph>
Auto-numbered footnote 5.
- <footnote auto="1" dupnames="five" ids="id12">
- <system_message backrefs="id12" level="2" line="14" source="test data" type="WARNING">
+ <footnote auto="1" dupnames="five" ids="five-1">
+ <system_message backrefs="five-1" level="2" line="14" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "five".
<paragraph>
Auto-numbered footnote 5 again (duplicate).
- <footnote auto="1" ids="id13">
+ <footnote auto="1" ids="footnote-4">
<paragraph>
Auto-numbered footnote 6.
"""],
@@ -322,7 +322,7 @@ totest['auto_symbol_footnotes'] = [
""",
"""\
<document source="test data">
- <footnote auto="*" ids="id1">
+ <footnote auto="*" ids="footnote-1">
<paragraph>
This is an auto-symbol footnote.
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_inline_markup.py b/docutils/test/test_parsers/test_rst/test_inline_markup.py
index faa2a9374..0624d90f2 100755
--- a/docutils/test/test_parsers/test_rst/test_inline_markup.py
+++ b/docutils/test/test_parsers/test_rst/test_inline_markup.py
@@ -72,10 +72,10 @@ across lines*
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
emphasis without closing asterisk
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
"""],
@@ -146,10 +146,10 @@ what about *this**?
(escaped, whitespace before end-string).
<paragraph>
However, '
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
args' will trigger a warning and may be problematic.
- <system_message backrefs="id2" ids="id1" level="2" line="13" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="13" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
<paragraph>
@@ -360,10 +360,10 @@ u"""\
) but not (**) or '(** ' or x**2 or **kwargs or **
<paragraph>
(however, '
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
**
kwargs' will trigger a warning and may be problematic)
- <system_message backrefs="id2" ids="id1" level="2" line="4" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="4" source="test data" type="WARNING">
<paragraph>
Inline strong start-string without end-string.
"""],
@@ -389,10 +389,10 @@ Strong double asterisk: ******
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
**
strong without closing asterisks
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline strong start-string without end-string.
"""],
@@ -514,11 +514,11 @@ and may be problematic)
but not "``" or ``
<paragraph>
(however, \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
``
standalone TeX quotes'' will trigger a warning
and may be problematic)
- <system_message backrefs="id2" ids="id1" level="2" line="4" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="4" source="test data" type="WARNING">
<paragraph>
Inline literal start-string without end-string.
"""],
@@ -539,10 +539,10 @@ Find the ```interpreted text``` in this paragraph!
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
``
literal without closing backquotes
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline literal start-string without end-string.
"""],
@@ -909,9 +909,9 @@ Invalid phrase reference:
<paragraph>
Invalid phrase reference:
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:role:`phrase reference`_
- <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="3" source="test data" type="WARNING">
<paragraph>
Mismatch: both interpreted text role prefix and reference suffix.
"""],
@@ -925,9 +925,9 @@ Invalid phrase reference:
<paragraph>
Invalid phrase reference:
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
`phrase reference`:role:_
- <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="3" source="test data" type="WARNING">
<paragraph>
Mismatch: both interpreted text role suffix and reference suffix.
"""],
@@ -937,13 +937,13 @@ Invalid phrase reference:
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
`
phrase \n\
<reference name="reference" refname="reference">
reference
without closing backquote
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
"""],
@@ -953,13 +953,13 @@ Invalid phrase reference:
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
`
anonymous phrase \n\
<reference anonymous="1" name="reference">
reference
without closing backquote
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
"""],
@@ -1336,10 +1336,10 @@ And _`this`_ is just plain confusing.
But this isn't a _target; targets require backquotes.
<paragraph>
And \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
_`
this`_ is just plain confusing.
- <system_message backrefs="id2" ids="id1" level="2" line="3" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="3" source="test data" type="WARNING">
<paragraph>
Inline target start-string without end-string.
"""],
@@ -1349,10 +1349,10 @@ _`inline target without closing backquote
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
_`
inline target without closing backquote
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline target start-string without end-string.
"""],
@@ -1365,7 +1365,7 @@ totest['footnote_reference'] = [
"""\
<document source="test data">
<paragraph>
- <footnote_reference ids="id1" refname="1">
+ <footnote_reference ids="footnote-reference-1" refname="1">
1
"""],
["""\
@@ -1374,7 +1374,7 @@ totest['footnote_reference'] = [
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="1" ids="id1">
+ <footnote_reference auto="1" ids="footnote-reference-1">
"""],
["""\
[#label]_
@@ -1382,7 +1382,7 @@ totest['footnote_reference'] = [
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="1" ids="id1" refname="label">
+ <footnote_reference auto="1" ids="footnote-reference-1" refname="label">
"""],
["""\
[*]_
@@ -1390,7 +1390,7 @@ totest['footnote_reference'] = [
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="*" ids="id1">
+ <footnote_reference auto="*" ids="footnote-reference-1">
"""],
["""\
Adjacent footnote refs are not possible: [*]_[#label]_ [#]_[2]_ [1]_[*]_
@@ -1409,7 +1409,7 @@ totest['citation_reference'] = [
"""\
<document source="test data">
<paragraph>
- <citation_reference ids="id1" refname="citation">
+ <citation_reference ids="citation-reference-1" refname="citation">
citation
"""],
["""\
@@ -1418,16 +1418,16 @@ totest['citation_reference'] = [
"""\
<document source="test data">
<paragraph>
- <citation_reference ids="id1" refname="citation">
+ <citation_reference ids="citation-reference-1" refname="citation">
citation
and \n\
- <citation_reference ids="id2" refname="cit-ation">
+ <citation_reference ids="citation-reference-2" refname="cit-ation">
cit-ation
and \n\
- <citation_reference ids="id3" refname="cit.ation">
+ <citation_reference ids="citation-reference-3" refname="cit.ation">
cit.ation
and \n\
- <citation_reference ids="id4" refname="cit1">
+ <citation_reference ids="citation-reference-4" refname="cit1">
CIT1
but not [CIT 1]_
"""],
@@ -1491,10 +1491,10 @@ reference|
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
|
substitution reference without closing verbar
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline substitution_reference start-string without end-string.
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_interpreted.py b/docutils/test/test_parsers/test_rst/test_interpreted.py
index 2727a8a3c..04feaefb4 100755
--- a/docutils/test/test_parsers/test_rst/test_interpreted.py
+++ b/docutils/test/test_parsers/test_rst/test_interpreted.py
@@ -105,10 +105,10 @@ totest['basics'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
`
interpreted without closing backquote
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
"""],
@@ -164,10 +164,10 @@ totest['basics'] = [
<document source="test data">
<paragraph>
:title:
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
`
` (trailing unquoted space)
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
"""],
@@ -311,9 +311,9 @@ totest['references'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:PEP:`-1`
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
PEP number must be a number from 0 to 9999; "-1" is invalid.
"""],
@@ -332,9 +332,9 @@ totest['references'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:RFC:`0`
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
RFC number must be a number greater than or equal to 1; "0" is invalid.
"""],
@@ -356,13 +356,13 @@ totest['unknown_roles'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:role:`interpreted`
<system_message level="1" line="1" source="test data" type="INFO">
<paragraph>
No role entry for "role" in module "docutils.parsers.rst.languages.en".
Trying "role" as canonical role name.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Unknown interpreted text role "role".
"""],
@@ -372,13 +372,13 @@ totest['unknown_roles'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
`interpreted`:role:
<system_message level="1" line="1" source="test data" type="INFO">
<paragraph>
No role entry for "role" in module "docutils.parsers.rst.languages.en".
Trying "role" as canonical role name.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Unknown interpreted text role "role".
"""],
@@ -388,9 +388,9 @@ totest['unknown_roles'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:role:`interpreted`:role:
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Multiple roles in interpreted text (both prefix and suffix present; only one allowed).
"""],
@@ -400,13 +400,13 @@ totest['unknown_roles'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:very.long-role_name:`interpreted`
<system_message level="1" line="1" source="test data" type="INFO">
<paragraph>
No role entry for "very.long-role_name" in module "docutils.parsers.rst.languages.en".
Trying "very.long-role_name" as canonical role name.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Unknown interpreted text role "very.long-role_name".
"""],
@@ -416,13 +416,13 @@ totest['unknown_roles'] = [
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
:restructuredtext-unimplemented-role:`interpreted`
<system_message level="1" line="1" source="test data" type="INFO">
<paragraph>
No role entry for "restructuredtext-unimplemented-role" in module "docutils.parsers.rst.languages.en".
Trying "restructuredtext-unimplemented-role" as canonical role name.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Interpreted text role "restructuredtext-unimplemented-role" not implemented.
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_line_blocks.py b/docutils/test/test_parsers/test_rst/test_line_blocks.py
index 79598c086..d80a1c939 100755
--- a/docutils/test/test_parsers/test_rst/test_line_blocks.py
+++ b/docutils/test/test_parsers/test_rst/test_line_blocks.py
@@ -248,16 +248,16 @@ This is not
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
|
This is not
- <problematic ids="id4" refid="id3">
+ <problematic ids="problematic-2" refid="system-message-2">
|
a line block
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline substitution_reference start-string without end-string.
- <system_message backrefs="id4" ids="id3" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-2" ids="system-message-2" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline substitution_reference start-string without end-string.
<line_block>
@@ -267,10 +267,10 @@ This is not
<paragraph>
Line block ends without a blank line.
<paragraph>
- <problematic ids="id6" refid="id5">
+ <problematic ids="problematic-3" refid="system-message-3">
|
incomplete line block.
- <system_message backrefs="id6" ids="id5" level="2" line="5" source="test data" type="WARNING">
+ <system_message backrefs="problematic-3" ids="system-message-3" level="2" line="5" source="test data" type="WARNING">
<paragraph>
Inline substitution_reference start-string without end-string.
"""],
@@ -283,12 +283,12 @@ This is not
<line_block>
<line>
Inline markup \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
*
may not
<line>
wrap* over several lines.
- <system_message backrefs="id2" ids="id1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
<paragraph>
Inline emphasis start-string without end-string.
"""],
@@ -319,13 +319,13 @@ System messages can appear in place of lines:
<reference name="uff" refuri="test1">
uff
<target dupnames="uff" ids="uff" refuri="test1">
- <system_message backrefs="id1" level="2" line="3" source="test data" type="WARNING">
+ <system_message backrefs="uff-1" level="2" line="3" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "uff".
<line>
<reference name="uff" refuri="test2">
uff
- <target dupnames="uff" ids="id1" refuri="test2">
+ <target dupnames="uff" ids="uff-1" refuri="test2">
"""],
]
diff --git a/docutils/test/test_parsers/test_rst/test_section_headers.py b/docutils/test/test_parsers/test_rst/test_section_headers.py
index 5563609f0..05daaed4d 100755
--- a/docutils/test/test_parsers/test_rst/test_section_headers.py
+++ b/docutils/test/test_parsers/test_rst/test_section_headers.py
@@ -807,17 +807,17 @@ Paragraph
<paragraph>
Possible incomplete section title.
Treating the overline as ordinary text because it's so short.
- <section dupnames="..." ids="id1">
+ <section dupnames="..." ids="section-1">
<title>
...
<system_message level="1" line="4" source="test data" type="INFO">
<paragraph>
Possible incomplete section title.
Treating the overline as ordinary text because it's so short.
- <section dupnames="..." ids="id2">
+ <section dupnames="..." ids="section-2">
<title>
...
- <system_message backrefs="id2" level="1" line="5" source="test data" type="INFO">
+ <system_message backrefs="section-2" level="1" line="5" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "...".
<system_message level="1" line="7" source="test data" type="INFO">
@@ -828,10 +828,10 @@ Paragraph
<paragraph>
Possible incomplete section title.
Treating the overline as ordinary text because it's so short.
- <section dupnames="..." ids="id3">
+ <section dupnames="..." ids="section-3">
<title>
...
- <system_message backrefs="id3" level="1" line="8" source="test data" type="INFO">
+ <system_message backrefs="section-3" level="1" line="8" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "...".
<paragraph>
diff --git a/docutils/test/test_parsers/test_rst/test_substitutions.py b/docutils/test/test_parsers/test_rst/test_substitutions.py
index 25874d36b..c50937fab 100755
--- a/docutils/test/test_parsers/test_rst/test_substitutions.py
+++ b/docutils/test/test_parsers/test_rst/test_substitutions.py
@@ -288,7 +288,7 @@ Elements that are prohibited inside of substitution definitions:
<paragraph>
Substitution definition contains illegal element <footnote_reference>:
<literal_block xml:space="preserve">
- <footnote_reference auto="1" ids="id1">
+ <footnote_reference auto="1" ids="footnote-reference-1">
<literal_block xml:space="preserve">
.. |auto-numbered footnote| replace:: [#]_
"""],
diff --git a/docutils/test/test_parsers/test_rst/test_targets.py b/docutils/test/test_parsers/test_rst/test_targets.py
index 560c50b89..913244097 100755
--- a/docutils/test/test_parsers/test_rst/test_targets.py
+++ b/docutils/test/test_parsers/test_rst/test_targets.py
@@ -1,3 +1,4 @@
+
#! /usr/bin/env python
# $Id$
@@ -179,10 +180,10 @@ Duplicate external targets (different URIs):
<paragraph>
Duplicate external targets (different URIs):
<target dupnames="target" ids="target" refuri="first">
- <system_message backrefs="id1" level="2" line="5" source="test data" type="WARNING">
+ <system_message backrefs="target-1" level="2" line="5" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "target".
- <target dupnames="target" ids="id1" refuri="second">
+ <target dupnames="target" ids="target-1" refuri="second">
"""],
["""\
Duplicate external targets (same URIs):
@@ -196,10 +197,10 @@ Duplicate external targets (same URIs):
<paragraph>
Duplicate external targets (same URIs):
<target ids="target" names="target" refuri="first">
- <system_message backrefs="id1" level="1" line="5" source="test data" type="INFO">
+ <system_message backrefs="target-1" level="1" line="5" source="test data" type="INFO">
<paragraph>
Duplicate explicit target name: "target".
- <target dupnames="target" ids="id1" refuri="first">
+ <target dupnames="target" ids="target-1" refuri="first">
"""],
["""\
Duplicate implicit targets.
@@ -223,10 +224,10 @@ Paragraph.
Title
<paragraph>
Paragraph.
- <section dupnames="title" ids="id1">
+ <section dupnames="title" ids="title-1">
<title>
Title
- <system_message backrefs="id1" level="1" line="9" source="test data" type="INFO">
+ <system_message backrefs="title-1" level="1" line="9" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "title".
<paragraph>
@@ -249,10 +250,10 @@ Paragraph.
<section dupnames="title" ids="title">
<title>
Title
- <system_message backrefs="id1" level="1" line="6" source="test data" type="INFO">
+ <system_message backrefs="title-1" level="1" line="6" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "title".
- <target ids="id1" names="title">
+ <target ids="title-1" names="title">
<paragraph>
Paragraph.
"""],
@@ -272,8 +273,8 @@ Title
<section dupnames="title" ids="title">
<title>
Title
- <pending ids="id1" names="title">
- <system_message backrefs="id1" level="1" line="4" source="test data" type="INFO">
+ <pending ids="title-1" names="title">
+ <system_message backrefs="title-1" level="1" line="4" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "title".
.. internal attributes:
@@ -302,16 +303,16 @@ Third.
<target dupnames="title" ids="title">
<paragraph>
First.
- <system_message backrefs="id1" level="2" line="7" source="test data" type="WARNING">
+ <system_message backrefs="title-1" level="2" line="7" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "title".
- <target dupnames="title" ids="id1">
+ <target dupnames="title" ids="title-1">
<paragraph>
Second.
- <system_message backrefs="id2" level="2" line="11" source="test data" type="WARNING">
+ <system_message backrefs="title-2" level="2" line="11" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "title".
- <target dupnames="title" ids="id2">
+ <target dupnames="title" ids="title-2">
<paragraph>
Third.
"""],
@@ -333,9 +334,9 @@ First.
<target dupnames="title" ids="title">
<paragraph>
First.
- <rubric dupnames="title" ids="id1">
+ <rubric dupnames="title" ids="title-1">
this is a title too
- <system_message backrefs="id1" level="2" line="9" source="test data" type="WARNING">
+ <system_message backrefs="title-1" level="2" line="9" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "title".
"""],
@@ -369,33 +370,33 @@ Explicit internal target.
Target
<paragraph>
Implicit section header target.
- <citation dupnames="target" ids="id1">
+ <citation dupnames="target" ids="target-1">
<label>
TARGET
- <system_message backrefs="id1" level="1" line="8" source="test data" type="INFO">
+ <system_message backrefs="target-1" level="1" line="8" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "target".
<paragraph>
Citation target.
- <footnote auto="1" dupnames="target" ids="id2">
- <system_message backrefs="id2" level="2" line="10" source="test data" type="WARNING">
+ <footnote auto="1" dupnames="target" ids="target-2">
+ <system_message backrefs="target-2" level="2" line="10" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "target".
<paragraph>
Autonumber-labeled footnote target.
- <system_message backrefs="id3" level="2" line="12" source="test data" type="WARNING">
+ <system_message backrefs="target-3" level="2" line="12" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "target".
- <target dupnames="target" ids="id3">
+ <target dupnames="target" ids="target-3">
<paragraph>
Explicit internal target.
- <system_message backrefs="id4" level="2" line="16" source="test data" type="WARNING">
+ <system_message backrefs="target-4" level="2" line="16" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "target".
- <target dupnames="target" ids="id4" refuri="Explicit_external_target">
- <rubric dupnames="target" ids="id5">
+ <target dupnames="target" ids="target-4" refuri="Explicit_external_target">
+ <rubric dupnames="target" ids="target-5">
directive with target
- <system_message backrefs="id5" level="2" line="4" source="test data" type="WARNING">
+ <system_message backrefs="target-5" level="2" line="4" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "target".
"""],
@@ -435,7 +436,7 @@ Anonymous external hyperlink target:
<document source="test data">
<paragraph>
Anonymous external hyperlink target:
- <target anonymous="1" ids="id1" refuri="http://w3c.org/">
+ <target anonymous="1" ids="target-1" refuri="http://w3c.org/">
"""],
["""\
Anonymous external hyperlink target:
@@ -446,7 +447,7 @@ __ http://w3c.org/
<document source="test data">
<paragraph>
Anonymous external hyperlink target:
- <target anonymous="1" ids="id1" refuri="http://w3c.org/">
+ <target anonymous="1" ids="target-1" refuri="http://w3c.org/">
"""],
["""\
Anonymous indirect hyperlink target:
@@ -457,7 +458,7 @@ Anonymous indirect hyperlink target:
<document source="test data">
<paragraph>
Anonymous indirect hyperlink target:
- <target anonymous="1" ids="id1" refname="reference">
+ <target anonymous="1" ids="target-1" refname="reference">
"""],
["""\
Anonymous external hyperlink target, not indirect:
@@ -470,8 +471,8 @@ __ this URI ends with an underscore_
<document source="test data">
<paragraph>
Anonymous external hyperlink target, not indirect:
- <target anonymous="1" ids="id1" refuri="uri_">
- <target anonymous="1" ids="id2" refuri="thisURIendswithanunderscore_">
+ <target anonymous="1" ids="target-1" refuri="uri_">
+ <target anonymous="1" ids="target-2" refuri="thisURIendswithanunderscore_">
"""],
["""\
Anonymous indirect hyperlink targets:
@@ -484,8 +485,8 @@ __ `a very long
<document source="test data">
<paragraph>
Anonymous indirect hyperlink targets:
- <target anonymous="1" ids="id1" refname="reference">
- <target anonymous="1" ids="id2" refname="a very long reference">
+ <target anonymous="1" ids="target-1" refname="reference">
+ <target anonymous="1" ids="target-2" refname="a very long reference">
"""],
["""\
Mixed anonymous & named indirect hyperlink targets:
@@ -506,9 +507,9 @@ no blank line
<document source="test data">
<paragraph>
Mixed anonymous & named indirect hyperlink targets:
- <target anonymous="1" ids="id1" refname="reference">
- <target anonymous="1" ids="id2" refname="reference">
- <target anonymous="1" ids="id3" refname="reference">
+ <target anonymous="1" ids="target-1" refname="reference">
+ <target anonymous="1" ids="target-2" refname="reference">
+ <target anonymous="1" ids="target-3" refname="reference">
<target ids="target1" names="target1" refname="reference">
<system_message level="2" line="7" source="test data" type="WARNING">
<paragraph>
@@ -516,9 +517,9 @@ no blank line
<paragraph>
no blank line
<target ids="target2" names="target2" refname="reference">
- <target anonymous="1" ids="id4" refname="reference">
- <target anonymous="1" ids="id5" refname="reference">
- <target anonymous="1" ids="id6" refname="reference">
+ <target anonymous="1" ids="target-4" refname="reference">
+ <target anonymous="1" ids="target-5" refname="reference">
+ <target anonymous="1" ids="target-6" refname="reference">
<system_message level="2" line="13" source="test data" type="WARNING">
<paragraph>
Explicit markup ends without a blank line; unexpected unindent.
diff --git a/docutils/test/test_publisher.py b/docutils/test/test_publisher.py
index 6edceac36..181197188 100755
--- a/docutils/test/test_publisher.py
+++ b/docutils/test/test_publisher.py
@@ -33,12 +33,12 @@ pseudoxml_output = b"""\
Test Document
<paragraph>
This is a test document with a broken reference: \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
nonexistent_
<section classes="system-messages">
<title>
Docutils System Messages
- <system_message backrefs="id2" ids="id1" level="3" line="4" source="<string>" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="4" source="<string>" type="ERROR">
<paragraph>
Unknown target name: "nonexistent".
"""
@@ -50,12 +50,12 @@ exposed_pseudoxml_output = (b"""\
Test Document
<paragraph>
This is a test document with a broken reference: \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
nonexistent_
<section classes="system-messages">
<title>
Docutils System Messages
- <system_message backrefs="id2" ids="id1" level="3" line="4" source="<string>" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="4" source="<string>" type="ERROR">
<paragraph>
Unknown target name: "nonexistent".
""") # % u_prefix # %-expansion not supported in bytes in 3.3 and 3.4
diff --git a/docutils/test/test_readers/test_pep/test_inline_markup.py b/docutils/test/test_readers/test_pep/test_inline_markup.py
index 10f1a63a8..8715b9641 100755
--- a/docutils/test/test_readers/test_pep/test_inline_markup.py
+++ b/docutils/test/test_readers/test_pep/test_inline_markup.py
@@ -124,9 +124,9 @@ For *completeness*, _`let's` ``test`` **other** forms_
<title_reference>
inline markup
\n\
- <footnote_reference auto="*" ids="id1">
+ <footnote_reference auto="*" ids="footnote-reference-1">
.
- <footnote auto="*" ids="id2">
+ <footnote auto="*" ids="footnote-1">
<paragraph>
See \n\
<reference refuri="http://docutils.sf.net/docs/ref/rst/restructuredtext.html">
diff --git a/docutils/test/test_transforms/test_contents.py b/docutils/test/test_transforms/test_contents.py
index 1d5e66ce1..c9c2015e4 100755
--- a/docutils/test/test_transforms/test_contents.py
+++ b/docutils/test/test_transforms/test_contents.py
@@ -53,26 +53,26 @@ Paragraph 4.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="title-1">
+ <reference ids="toc-entry-1" refid="title-1">
Title 1
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id2" refid="title-2">
+ <reference ids="toc-entry-2" refid="title-2">
Title
2
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id3" refid="title-3">
+ <reference ids="toc-entry-3" refid="title-3">
Title
3
<list_item>
<paragraph>
- <reference ids="id4" refid="title-4">
+ <reference ids="toc-entry-4" refid="title-4">
Title 4
<section ids="title-1" names="title\\ 1">
- <title refid="id1">
+ <title refid="toc-entry-1">
Title 1
<paragraph>
Paragraph 1.
@@ -84,14 +84,14 @@ Paragraph 4.
<paragraph>
Paragraph 2.
<section ids="title-3" names="title\\ 3">
- <title refid="id3">
+ <title refid="toc-entry-3">
<target ids="title" names="title">
Title
3
<paragraph>
Paragraph 3.
<section ids="title-4" names="title\\ 4">
- <title refid="id4">
+ <title refid="toc-entry-4">
Title 4
<paragraph>
Paragraph 4.
@@ -115,20 +115,20 @@ Paragraph 2.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="title-1">
+ <reference ids="toc-entry-1" refid="title-1">
Title 1
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id2" refid="title-2">
+ <reference ids="toc-entry-2" refid="title-2">
Title 2
<section ids="title-1" names="title\\ 1">
- <title refid="id1">
+ <title refid="toc-entry-1">
Title 1
<paragraph>
Paragraph 1.
<section ids="title-2" names="title\\ 2">
- <title refid="id2">
+ <title refid="toc-entry-2">
Title 2
<paragraph>
Paragraph 2.
@@ -154,19 +154,19 @@ Paragraph 2.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="title-1">
+ <reference ids="toc-entry-1" refid="title-1">
Title 1
<list_item>
<paragraph>
- <reference ids="id2" refid="title-2">
+ <reference ids="toc-entry-2" refid="title-2">
Title 2
<section ids="title-1" names="title\\ 1">
- <title refid="id1">
+ <title refid="toc-entry-1">
Title 1
<paragraph>
Paragraph 1.
<section ids="title-2" names="title\\ 2">
- <title refid="id2">
+ <title refid="toc-entry-2">
<image alt="Title 2" uri="title2.png">
<paragraph>
Paragraph 2.
@@ -201,24 +201,24 @@ Paragraph 4.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="title-1">
+ <reference ids="toc-entry-1" refid="title-1">
Title 1
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id2" refid="title-2">
+ <reference ids="toc-entry-2" refid="title-2">
Title 2
<list_item>
<paragraph>
- <reference ids="id3" refid="title-4">
+ <reference ids="toc-entry-3" refid="title-4">
Title 4
<section ids="title-1" names="title\\ 1">
- <title refid="id1">
+ <title refid="toc-entry-1">
Title 1
<paragraph>
Paragraph 1.
<section ids="title-2" names="title\\ 2">
- <title refid="id2">
+ <title refid="toc-entry-2">
Title 2
<paragraph>
Paragraph 2.
@@ -228,7 +228,7 @@ Paragraph 4.
<paragraph>
Paragraph 3.
<section ids="title-4" names="title\\ 4">
- <title refid="id3">
+ <title refid="toc-entry-3">
Title 4
<paragraph>
Paragraph 4.
@@ -263,31 +263,31 @@ Paragraph 4.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="title-2">
+ <reference ids="toc-entry-1" refid="title-2">
Title 2
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id2" refid="title-3">
+ <reference ids="toc-entry-2" refid="title-3">
Title 3
<list_item>
<paragraph>
- <reference ids="id3" refid="title-4">
+ <reference ids="toc-entry-3" refid="title-4">
Title 4
<paragraph>
Paragraph 1.
<section ids="title-2" names="title\\ 2">
- <title refid="id1">
+ <title refid="toc-entry-1">
Title 2
<paragraph>
Paragraph 2.
<section ids="title-3" names="title\\ 3">
- <title refid="id2">
+ <title refid="toc-entry-2">
Title 3
<paragraph>
Paragraph 3.
<section ids="title-4" names="title\\ 4">
- <title refid="id3">
+ <title refid="toc-entry-3">
Title 4
<paragraph>
Paragraph 4.
@@ -308,12 +308,12 @@ Paragraph.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="section">
+ <reference ids="toc-entry-1" refid="section">
Section
<paragraph>
Test duplicate name "Contents".
<section ids="section" names="section">
- <title refid="id1">
+ <title refid="toc-entry-1">
Section
<paragraph>
Paragraph.
@@ -334,7 +334,7 @@ Paragraph.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="section">
+ <reference ids="toc-entry-1" refid="section">
Section
<section ids="section" names="section">
<title refid="contents">
@@ -358,7 +358,7 @@ Paragraph.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="section">
+ <reference ids="toc-entry-1" refid="section">
Section
<section ids="section" names="section">
<title>
@@ -409,20 +409,20 @@ Paragraph 3.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="title-2">
+ <reference ids="toc-entry-1" refid="title-2">
Title 2
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id2" refid="title-3">
+ <reference ids="toc-entry-2" refid="title-3">
Title 3
<section ids="title-2" names="title\\ 2">
- <title refid="id1">
+ <title refid="toc-entry-1">
Title 2
<paragraph>
Paragraph 2.
<section ids="title-3" names="title\\ 3">
- <title refid="id2">
+ <title refid="toc-entry-2">
Title 3
<paragraph>
Paragraph 3.
diff --git a/docutils/test/test_transforms/test_footnotes.py b/docutils/test/test_transforms/test_footnotes.py
index a7104f541..f3bf94cea 100755
--- a/docutils/test/test_transforms/test_footnotes.py
+++ b/docutils/test/test_transforms/test_footnotes.py
@@ -33,9 +33,9 @@ totest['footnotes'] = ((Footnotes,), [
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="1" ids="id1" refid="autolabel">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="autolabel">
1
- <footnote auto="1" backrefs="id1" ids="autolabel" names="autolabel">
+ <footnote auto="1" backrefs="footnote-reference-1" ids="autolabel" names="autolabel">
<label>
1
<paragraph>
@@ -50,9 +50,9 @@ autonumber: [#]_
<document source="test data">
<paragraph>
autonumber: \n\
- <footnote_reference auto="1" ids="id1" refid="id2">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="footnote-1">
1
- <footnote auto="1" backrefs="id1" ids="id2" names="1">
+ <footnote auto="1" backrefs="footnote-reference-1" ids="footnote-1" names="1">
<label>
1
<paragraph>
@@ -71,29 +71,29 @@ autonumber: [#]_
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="1" ids="id1" refid="id3">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="footnote-1">
1
is the first auto-numbered footnote reference.
- <footnote_reference auto="1" ids="id2" refid="id4">
+ <footnote_reference auto="1" ids="footnote-reference-2" refid="footnote-2">
2
is the second auto-numbered footnote reference.
- <footnote auto="1" backrefs="id1" ids="id3" names="1">
+ <footnote auto="1" backrefs="footnote-reference-1" ids="footnote-1" names="1">
<label>
1
<paragraph>
Auto-numbered footnote 1.
- <footnote auto="1" backrefs="id2" ids="id4" names="2">
+ <footnote auto="1" backrefs="footnote-reference-2" ids="footnote-2" names="2">
<label>
2
<paragraph>
Auto-numbered footnote 2.
- <footnote auto="1" backrefs="id6" ids="id5" names="3">
+ <footnote auto="1" backrefs="footnote-reference-3" ids="footnote-3" names="3">
<label>
3
<paragraph>
Auto-numbered footnote 3.
<paragraph>
- <footnote_reference auto="1" ids="id6" refid="id5">
+ <footnote_reference auto="1" ids="footnote-reference-3" refid="footnote-3">
3
is the third auto-numbered footnote reference.
"""],
@@ -114,32 +114,32 @@ generated by the footnotes: first_, second_, third_.
"""\
<document source="test data">
<paragraph>
- <footnote_reference auto="1" ids="id1" refid="third">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="third">
3
is a reference to the third auto-numbered footnote.
- <footnote auto="1" backrefs="id3" ids="first" names="first">
+ <footnote auto="1" backrefs="footnote-reference-3" ids="first" names="first">
<label>
1
<paragraph>
First auto-numbered footnote.
- <footnote auto="1" backrefs="id2" ids="second" names="second">
+ <footnote auto="1" backrefs="footnote-reference-2" ids="second" names="second">
<label>
2
<paragraph>
Second auto-numbered footnote.
- <footnote auto="1" backrefs="id1 id4" ids="third" names="third">
+ <footnote auto="1" backrefs="footnote-reference-1 footnote-reference-4" ids="third" names="third">
<label>
3
<paragraph>
Third auto-numbered footnote.
<paragraph>
- <footnote_reference auto="1" ids="id2" refid="second">
+ <footnote_reference auto="1" ids="footnote-reference-2" refid="second">
2
is a reference to the second auto-numbered footnote.
- <footnote_reference auto="1" ids="id3" refid="first">
+ <footnote_reference auto="1" ids="footnote-reference-3" refid="first">
1
is a reference to the first auto-numbered footnote.
- <footnote_reference auto="1" ids="id4" refid="third">
+ <footnote_reference auto="1" ids="footnote-reference-4" refid="third">
3
is another reference to the third auto-numbered footnote.
<paragraph>
@@ -174,39 +174,39 @@ Mixed anonymous and labelled auto-numbered footnotes:
<paragraph>
Mixed anonymous and labelled auto-numbered footnotes:
<paragraph>
- <footnote_reference auto="1" ids="id1" refid="four">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="four">
4
should be 4, \n\
- <footnote_reference auto="1" ids="id2" refid="id7">
+ <footnote_reference auto="1" ids="footnote-reference-2" refid="footnote-1">
1
should be 1,
- <footnote_reference auto="1" ids="id3" refid="id8">
+ <footnote_reference auto="1" ids="footnote-reference-3" refid="footnote-2">
3
should be 3, \n\
- <problematic ids="id11 id4" refid="id10">
+ <problematic ids="problematic-1 footnote-reference-4" refid="system-message-1">
[#]_
is one too many,
- <footnote_reference auto="1" ids="id5" refid="two">
+ <footnote_reference auto="1" ids="footnote-reference-5" refid="two">
2
should be 2, and \n\
- <footnote_reference auto="1" ids="id6" refname="six">
+ <footnote_reference auto="1" ids="footnote-reference-6" refname="six">
doesn't exist.
- <footnote auto="1" backrefs="id2" ids="id7" names="1">
+ <footnote auto="1" backrefs="footnote-reference-2" ids="footnote-1" names="1">
<label>
1
<paragraph>
Auto-numbered footnote 1.
- <footnote auto="1" backrefs="id5" ids="two" names="two">
+ <footnote auto="1" backrefs="footnote-reference-5" ids="two" names="two">
<label>
2
<paragraph>
Auto-numbered footnote 2.
- <footnote auto="1" backrefs="id3" ids="id8" names="3">
+ <footnote auto="1" backrefs="footnote-reference-3" ids="footnote-2" names="3">
<label>
3
<paragraph>
Auto-numbered footnote 3.
- <footnote auto="1" backrefs="id1" ids="four" names="four">
+ <footnote auto="1" backrefs="footnote-reference-1" ids="four" names="four">
<label>
4
<paragraph>
@@ -216,15 +216,15 @@ Mixed anonymous and labelled auto-numbered footnotes:
5
<paragraph>
Auto-numbered footnote 5.
- <footnote auto="1" dupnames="five" ids="id9">
+ <footnote auto="1" dupnames="five" ids="five-1">
<label>
6
- <system_message backrefs="id9" level="2" line="12" source="test data" type="WARNING">
+ <system_message backrefs="five-1" level="2" line="12" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "five".
<paragraph>
Auto-numbered footnote 5 again (duplicate).
- <system_message backrefs="id11" ids="id10" level="3" line="3" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="3" source="test data" type="ERROR">
<paragraph>
Too many autonumbered footnote references: only 2 corresponding footnotes available.
"""],
@@ -239,12 +239,12 @@ Mixed auto-numbered and manual footnotes:
<document source="test data">
<paragraph>
Mixed auto-numbered and manual footnotes:
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
manually numbered
- <footnote auto="1" ids="id2" names="2">
+ <footnote auto="1" ids="footnote-2" names="2">
<label>
2
<paragraph>
@@ -269,20 +269,20 @@ An unlabeled autonumbered footnote referece: [#]_.
<document source="test data">
<paragraph>
A labeled autonumbered footnote referece: \n\
- <footnote_reference auto="1" ids="id1" refid="footnote">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="footnote">
2
.
<paragraph>
An unlabeled autonumbered footnote referece: \n\
- <footnote_reference auto="1" ids="id2" refid="id3">
+ <footnote_reference auto="1" ids="footnote-reference-2" refid="footnote-1">
1
.
- <footnote auto="1" backrefs="id2" ids="id3" names="1">
+ <footnote auto="1" backrefs="footnote-reference-2" ids="footnote-1" names="1">
<label>
1
<paragraph>
Unlabeled autonumbered footnote.
- <footnote auto="1" backrefs="id1" ids="footnote" names="footnote">
+ <footnote auto="1" backrefs="footnote-reference-1" ids="footnote" names="footnote">
<label>
2
<paragraph>
@@ -313,44 +313,44 @@ and labelled auto-numbered footnotes:
Mixed manually-numbered, anonymous auto-numbered,
and labelled auto-numbered footnotes:
<paragraph>
- <footnote_reference auto="1" ids="id1" refid="four">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="four">
4
should be 4, \n\
- <footnote_reference auto="1" ids="id2" refid="id10">
+ <footnote_reference auto="1" ids="footnote-reference-2" refid="footnote-2">
2
should be 2,
- <footnote_reference ids="id3" refid="id9">
+ <footnote_reference ids="footnote-reference-3" refid="footnote-1">
1
is 1, \n\
- <footnote_reference ids="id4" refid="id11">
+ <footnote_reference ids="footnote-reference-4" refid="footnote-3">
3
is 3,
- <footnote_reference auto="1" ids="id5" refid="id12">
+ <footnote_reference auto="1" ids="footnote-reference-5" refid="footnote-4">
6
should be 6, \n\
- <problematic ids="id15 id6" refid="id14">
+ <problematic ids="problematic-1 footnote-reference-6" refid="system-message-1">
[#]_
is one too many,
- <footnote_reference auto="1" ids="id7" refname="five">
+ <footnote_reference auto="1" ids="footnote-reference-7" refname="five">
should be 5, and \n\
- <footnote_reference auto="1" ids="id8" refname="eight">
+ <footnote_reference auto="1" ids="footnote-reference-8" refname="eight">
doesn't exist.
- <footnote backrefs="id3" ids="id9" names="1">
+ <footnote backrefs="footnote-reference-3" ids="footnote-1" names="1">
<label>
1
<paragraph>
Manually-numbered footnote 1.
- <footnote auto="1" backrefs="id2" ids="id10" names="2">
+ <footnote auto="1" backrefs="footnote-reference-2" ids="footnote-2" names="2">
<label>
2
<paragraph>
Auto-numbered footnote 2.
- <footnote auto="1" backrefs="id1" ids="four" names="four">
+ <footnote auto="1" backrefs="footnote-reference-1" ids="four" names="four">
<label>
4
<paragraph>
Auto-numbered footnote 4.
- <footnote backrefs="id4" ids="id11" names="3">
+ <footnote backrefs="footnote-reference-4" ids="footnote-3" names="3">
<label>
3
<paragraph>
@@ -360,20 +360,20 @@ and labelled auto-numbered footnotes:
5
<paragraph>
Auto-numbered footnote 5.
- <footnote auto="1" backrefs="id5" ids="id12" names="6">
+ <footnote auto="1" backrefs="footnote-reference-5" ids="footnote-4" names="6">
<label>
6
<paragraph>
Auto-numbered footnote 6.
- <footnote auto="1" dupnames="five" ids="id13">
+ <footnote auto="1" dupnames="five" ids="five-1">
<label>
7
- <system_message backrefs="id13" level="2" line="15" source="test data" type="WARNING">
+ <system_message backrefs="five-1" level="2" line="15" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "five".
<paragraph>
Auto-numbered footnote 5 again (duplicate).
- <system_message backrefs="id15" ids="id14" level="3" line="4" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="4" source="test data" type="ERROR">
<paragraph>
Too many autonumbered footnote references: only 2 corresponding footnotes available.
"""],
@@ -386,10 +386,10 @@ Referencing a footnote by symbol [*]_.
<document source="test data">
<paragraph>
Referencing a footnote by symbol \n\
- <footnote_reference auto="*" ids="id1" refid="id2">
+ <footnote_reference auto="*" ids="footnote-reference-1" refid="footnote-1">
*
.
- <footnote auto="*" backrefs="id1" ids="id2">
+ <footnote auto="*" backrefs="footnote-reference-1" ids="footnote-1">
<label>
*
<paragraph>
@@ -416,98 +416,98 @@ u"""\
<document source="test data">
<paragraph>
A sequence of symbol footnote references:
- <footnote_reference auto="*" ids="id1" refid="id13">
+ <footnote_reference auto="*" ids="footnote-reference-1" refid="footnote-1">
*
\n\
- <footnote_reference auto="*" ids="id2" refid="id14">
+ <footnote_reference auto="*" ids="footnote-reference-2" refid="footnote-2">
\u2020
\n\
- <footnote_reference auto="*" ids="id3" refid="id15">
+ <footnote_reference auto="*" ids="footnote-reference-3" refid="footnote-3">
\u2021
\n\
- <footnote_reference auto="*" ids="id4" refid="id16">
+ <footnote_reference auto="*" ids="footnote-reference-4" refid="footnote-4">
\u00A7
\n\
- <footnote_reference auto="*" ids="id5" refid="id17">
+ <footnote_reference auto="*" ids="footnote-reference-5" refid="footnote-5">
\u00B6
\n\
- <footnote_reference auto="*" ids="id6" refid="id18">
+ <footnote_reference auto="*" ids="footnote-reference-6" refid="footnote-6">
#
\n\
- <footnote_reference auto="*" ids="id7" refid="id19">
+ <footnote_reference auto="*" ids="footnote-reference-7" refid="footnote-7">
\u2660
\n\
- <footnote_reference auto="*" ids="id8" refid="id20">
+ <footnote_reference auto="*" ids="footnote-reference-8" refid="footnote-8">
\u2665
\n\
- <footnote_reference auto="*" ids="id9" refid="id21">
+ <footnote_reference auto="*" ids="footnote-reference-9" refid="footnote-9">
\u2666
\n\
- <footnote_reference auto="*" ids="id10" refid="id22">
+ <footnote_reference auto="*" ids="footnote-reference-10" refid="footnote-10">
\u2663
\n\
- <footnote_reference auto="*" ids="id11" refid="id23">
+ <footnote_reference auto="*" ids="footnote-reference-11" refid="footnote-11">
**
\n\
- <footnote_reference auto="*" ids="id12" refid="id24">
+ <footnote_reference auto="*" ids="footnote-reference-12" refid="footnote-12">
\u2020\u2020
.
- <footnote auto="*" backrefs="id1" ids="id13">
+ <footnote auto="*" backrefs="footnote-reference-1" ids="footnote-1">
<label>
*
<paragraph>
Auto-symbol footnote 1.
- <footnote auto="*" backrefs="id2" ids="id14">
+ <footnote auto="*" backrefs="footnote-reference-2" ids="footnote-2">
<label>
\u2020
<paragraph>
Auto-symbol footnote 2.
- <footnote auto="*" backrefs="id3" ids="id15">
+ <footnote auto="*" backrefs="footnote-reference-3" ids="footnote-3">
<label>
\u2021
<paragraph>
Auto-symbol footnote 3.
- <footnote auto="*" backrefs="id4" ids="id16">
+ <footnote auto="*" backrefs="footnote-reference-4" ids="footnote-4">
<label>
\u00A7
<paragraph>
Auto-symbol footnote 4.
- <footnote auto="*" backrefs="id5" ids="id17">
+ <footnote auto="*" backrefs="footnote-reference-5" ids="footnote-5">
<label>
\u00B6
<paragraph>
Auto-symbol footnote 5.
- <footnote auto="*" backrefs="id6" ids="id18">
+ <footnote auto="*" backrefs="footnote-reference-6" ids="footnote-6">
<label>
#
<paragraph>
Auto-symbol footnote 6.
- <footnote auto="*" backrefs="id7" ids="id19">
+ <footnote auto="*" backrefs="footnote-reference-7" ids="footnote-7">
<label>
\u2660
<paragraph>
Auto-symbol footnote 7.
- <footnote auto="*" backrefs="id8" ids="id20">
+ <footnote auto="*" backrefs="footnote-reference-8" ids="footnote-8">
<label>
\u2665
<paragraph>
Auto-symbol footnote 8.
- <footnote auto="*" backrefs="id9" ids="id21">
+ <footnote auto="*" backrefs="footnote-reference-9" ids="footnote-9">
<label>
\u2666
<paragraph>
Auto-symbol footnote 9.
- <footnote auto="*" backrefs="id10" ids="id22">
+ <footnote auto="*" backrefs="footnote-reference-10" ids="footnote-10">
<label>
\u2663
<paragraph>
Auto-symbol footnote 10.
- <footnote auto="*" backrefs="id11" ids="id23">
+ <footnote auto="*" backrefs="footnote-reference-11" ids="footnote-11">
<label>
**
<paragraph>
Auto-symbol footnote 11.
- <footnote auto="*" backrefs="id12" ids="id24">
+ <footnote auto="*" backrefs="footnote-reference-12" ids="footnote-12">
<label>
\u2020\u2020
<paragraph>
@@ -524,15 +524,15 @@ Duplicate manual footnote labels:
<document source="test data">
<paragraph>
Duplicate manual footnote labels:
- <footnote dupnames="1" ids="id1">
+ <footnote dupnames="1" ids="footnote-1">
<label>
1
<paragraph>
Footnote.
- <footnote dupnames="1" ids="id2">
+ <footnote dupnames="1" ids="footnote-2">
<label>
1
- <system_message backrefs="id2" level="2" line="5" source="test data" type="WARNING">
+ <system_message backrefs="footnote-2" level="2" line="5" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "1".
<paragraph>
diff --git a/docutils/test/test_transforms/test_hyperlinks.py b/docutils/test/test_transforms/test_hyperlinks.py
index cb388a77e..8ec258d16 100755
--- a/docutils/test/test_transforms/test_hyperlinks.py
+++ b/docutils/test/test_transforms/test_hyperlinks.py
@@ -141,13 +141,13 @@ circular_ indirect reference
"""\
<document source="test data">
<paragraph>
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
circular_
indirect reference
<target ids="circular" names="circular" refid="circular">
- <problematic ids="id3 indirect" names="indirect" refid="id1">
+ <problematic ids="problematic-2 indirect" names="indirect" refid="system-message-1">
.. _indirect: circular_
- <system_message backrefs="id2 id3" ids="id1" level="3" line="3" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1 problematic-2" ids="system-message-1" level="3" line="3" source="test data" type="ERROR">
<paragraph>
Indirect hyperlink target "circular" (id="circular") refers to target "indirect", forming a circular reference.
"""],
@@ -173,25 +173,25 @@ Direct internal reference: Implicit_
Implicit
<paragraph>
Duplicate implicit targets.
- <section dupnames="implicit" ids="id1">
+ <section dupnames="implicit" ids="implicit-1">
<title>
Implicit
- <system_message backrefs="id1" level="1" line="7" source="test data" type="INFO">
+ <system_message backrefs="implicit-1" level="1" line="7" source="test data" type="INFO">
<paragraph>
Duplicate implicit target name: "implicit".
<paragraph>
- <problematic ids="id3" refid="id2">
+ <problematic ids="problematic-1" refid="system-message-1">
indirect_
internal
<target ids="indirect" names="indirect" refname="implicit">
<paragraph>
Direct internal reference:
- <problematic ids="id5" refid="id4">
+ <problematic ids="problematic-2" refid="system-message-2">
Implicit_
- <system_message backrefs="id3" ids="id2" level="3" line="11" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="11" source="test data" type="ERROR">
<paragraph>
Indirect hyperlink target "indirect" (id="indirect") refers to target "implicit", which is a duplicate, and cannot be used as a unique reference.
- <system_message backrefs="id5" ids="id4" level="3" line="13" source="test data" type="ERROR">
+ <system_message backrefs="problematic-2" ids="system-message-2" level="3" line="13" source="test data" type="ERROR">
<paragraph>
Duplicate target name, cannot be used as a unique reference: "implicit".
"""],
@@ -205,7 +205,7 @@ __ http://direct
<paragraph>
<reference anonymous="1" name="direct external" refuri="http://direct">
direct external
- <target anonymous="1" ids="id1" refuri="http://direct">
+ <target anonymous="1" ids="target-1" refuri="http://direct">
"""],
["""\
`indirect external`__
@@ -218,7 +218,7 @@ __ xtarget_
<paragraph>
<reference anonymous="1" name="indirect external" refuri="http://indirect">
indirect external
- <target anonymous="1" ids="id1" refuri="http://indirect">
+ <target anonymous="1" ids="target-1" refuri="http://indirect">
<target ids="xtarget" names="xtarget" refuri="http://indirect">
"""],
["""\
@@ -228,9 +228,9 @@ __
""",
"""\
<document source="test data">
- <target anonymous="1" refid="id1">
- <paragraph ids="id1">
- <reference anonymous="1" name="direct internal" refid="id1">
+ <target anonymous="1" refid="target-1">
+ <paragraph ids="target-1">
+ <reference anonymous="1" name="direct internal" refid="target-1">
direct internal
"""],
["""\
@@ -246,7 +246,7 @@ __ ztarget_
<paragraph ids="ztarget" names="ztarget">
<reference anonymous="1" name="indirect internal" refid="ztarget">
indirect internal
- <target anonymous="1" ids="id1" refid="ztarget">
+ <target anonymous="1" ids="target-1" refid="ztarget">
"""],
["""\
.. _ztarget:
@@ -266,19 +266,19 @@ __ ztarget_
<target dupnames="ztarget" refid="ztarget">
<paragraph ids="ztarget">
First
- <system_message backrefs="id1" level="2" line="5" source="test data" type="WARNING">
+ <system_message backrefs="ztarget-1" level="2" line="5" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "ztarget".
- <target dupnames="ztarget" refid="id1">
- <paragraph ids="id1">
+ <target dupnames="ztarget" refid="ztarget-1">
+ <paragraph ids="ztarget-1">
Second
<paragraph>
- <problematic ids="id4" refid="id3">
+ <problematic ids="problematic-1" refid="system-message-1">
`indirect internal`__
- <target anonymous="1" ids="id2" refname="ztarget">
- <system_message backrefs="id4" ids="id3" level="3" line="11" source="test data" type="ERROR">
+ <target anonymous="1" ids="target-1" refname="ztarget">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="11" source="test data" type="ERROR">
<paragraph>
- Indirect hyperlink target (id="id2") refers to target "ztarget", which is a duplicate, and cannot be used as a unique reference.
+ Indirect hyperlink target (id="target-1") refers to target "ztarget", which is a duplicate, and cannot be used as a unique reference.
"""],
["""\
The next anonymous hyperlink reference is parsed (and discarded) at
@@ -308,7 +308,7 @@ __ URL
<paragraph>
<reference anonymous="1" name="hyperlink" refuri="URL">
hyperlink
- <target anonymous="1" ids="id1" refuri="URL">
+ <target anonymous="1" ids="target-1" refuri="URL">
"""],
["""\
An `embedded uri <http://direct>`_.
@@ -383,14 +383,14 @@ An `embedded alias <alias_>`_ with unknown reference.
<document source="test data">
<paragraph>
An \n\
- <problematic ids="id3" refid="id2">
+ <problematic ids="problematic-1" refid="system-message-2">
`embedded alias <alias_>`_
<target names="embedded\\ alias" refname="alias">
with unknown reference.
- <system_message ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Indirect hyperlink target "embedded alias" refers to target "alias", which does not exist.
- <system_message backrefs="id3" ids="id2" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-2" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Unknown target name: "alias".
<system_message level="1" line="1" source="test data" type="INFO">
@@ -445,7 +445,7 @@ See `Element \\<a>`_, `Element <b\\>`_, and `Element <c>\\ `_.
"""\
<document source="test data">
<target ids="target" names="target">
- <footnote ids="id1" names="1">
+ <footnote ids="footnote-1" names="1">
<label>
1
<paragraph>
@@ -530,7 +530,7 @@ Anonymous__ and chained_ both refer to the same URI.
"""\
<document source="test data">
<target refid="chained">
- <target anonymous="1" ids="id1 chained" names="chained" refuri="http://anonymous">
+ <target anonymous="1" ids="target-1 chained" names="chained" refuri="http://anonymous">
<paragraph>
<reference anonymous="1" name="Anonymous" refuri="http://anonymous">
Anonymous
@@ -704,13 +704,13 @@ __
""",
"""\
<document source="test data">
- <target anonymous="1" ids="id1" refuri="http://full">
- <target anonymous="1" refid="id2">
- <target anonymous="1" ids="id3 id2" refuri="http://simplified">
+ <target anonymous="1" ids="target-1" refuri="http://full">
+ <target anonymous="1" refid="target-2">
+ <target anonymous="1" ids="target-3 target-2" refuri="http://simplified">
<target ids="external" names="external" refuri="http://indirect.external">
- <target anonymous="1" ids="id4" refuri="http://indirect.external">
- <target anonymous="1" refid="id5">
- <paragraph ids="id5">
+ <target anonymous="1" ids="target-4" refuri="http://indirect.external">
+ <target anonymous="1" refid="target-5">
+ <paragraph ids="target-5">
<reference anonymous="1" name="Full syntax anonymous external hyperlink reference" refuri="http://full">
Full syntax anonymous external hyperlink reference
,
@@ -723,7 +723,7 @@ __
<reference anonymous="1" name="indirect anonymous hyperlink reference" refuri="http://indirect.external">
indirect anonymous hyperlink reference
,
- <reference anonymous="1" name="internal anonymous hyperlink reference" refid="id5">
+ <reference anonymous="1" name="internal anonymous hyperlink reference" refid="target-5">
internal anonymous hyperlink reference
.
"""],
@@ -738,15 +738,15 @@ Duplicate external target_'s (different URIs):
<document source="test data">
<paragraph>
Duplicate external \n\
- <problematic ids="id3" refid="id2">
+ <problematic ids="problematic-1" refid="system-message-1">
target_
's (different URIs):
<target dupnames="target" ids="target" refuri="first">
- <system_message backrefs="id1" level="2" line="5" source="test data" type="WARNING">
+ <system_message backrefs="target-1" level="2" line="5" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "target".
- <target dupnames="target" ids="id1" refuri="second">
- <system_message backrefs="id3" ids="id2" level="3" line="1" source="test data" type="ERROR">
+ <target dupnames="target" ids="target-1" refuri="second">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Duplicate target name, cannot be used as a unique reference: "target".
"""],
@@ -762,10 +762,10 @@ Duplicate external targets (different URIs) without reference:
<paragraph>
Duplicate external targets (different URIs) without reference:
<target dupnames="target" ids="target" refuri="first">
- <system_message backrefs="id1" level="2" line="5" source="test data" type="WARNING">
+ <system_message backrefs="target-1" level="2" line="5" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "target".
- <target dupnames="target" ids="id1" refuri="second">
+ <target dupnames="target" ids="target-1" refuri="second">
"""],
["""\
Several__ anonymous__ hyperlinks__, but not enough targets.
@@ -775,17 +775,17 @@ __ http://example.org
"""\
<document source="test data">
<paragraph>
- <problematic ids="id3" refid="id2">
+ <problematic ids="problematic-1" refid="system-message-1">
Several__
\n\
- <problematic ids="id4" refid="id2">
+ <problematic ids="problematic-2" refid="system-message-1">
anonymous__
\n\
- <problematic ids="id5" refid="id2">
+ <problematic ids="problematic-3" refid="system-message-1">
hyperlinks__
, but not enough targets.
- <target anonymous="1" ids="id1" refuri="http://example.org">
- <system_message backrefs="id3 id4 id5" ids="id2" level="3" source="test data" type="ERROR">
+ <target anonymous="1" ids="target-1" refuri="http://example.org">
+ <system_message backrefs="problematic-1 problematic-2 problematic-3" ids="system-message-1" level="3" source="test data" type="ERROR">
<paragraph>
Anonymous hyperlink mismatch: 3 references but 1 targets.
See "backrefs" attribute for IDs.
@@ -833,11 +833,11 @@ Testing an `indirect reference to the table of contents`_.
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id1" refid="section">
+ <reference ids="toc-entry-1" refid="section">
Section
<target ids="indirect-reference-to-the-table-of-contents" names="indirect\\ reference\\ to\\ the\\ table\\ of\\ contents" refid="table-of-contents">
<section ids="section" names="section">
- <title refid="id1">
+ <title refid="toc-entry-1">
Section
<paragraph>
Testing an
@@ -896,10 +896,10 @@ Unknown reference_.
<document source="test data">
<paragraph>
Unknown \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
reference_
.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Unknown target name: "reference".
"""],
@@ -914,23 +914,23 @@ Duplicate manual footnote labels, with reference ([1]_):
<document source="test data">
<paragraph>
Duplicate manual footnote labels, with reference (
- <problematic ids="id1" refid="id4">
+ <problematic ids="footnote-reference-1" refid="system-message-1">
[1]_
):
- <footnote dupnames="1" ids="id2">
+ <footnote dupnames="1" ids="footnote-1">
<label>
1
<paragraph>
Footnote.
- <footnote dupnames="1" ids="id3">
+ <footnote dupnames="1" ids="footnote-2">
<label>
1
- <system_message backrefs="id3" level="2" line="5" source="test data" type="WARNING">
+ <system_message backrefs="footnote-2" level="2" line="5" source="test data" type="WARNING">
<paragraph>
Duplicate explicit target name: "1".
<paragraph>
Footnote.
- <system_message backrefs="id1" ids="id4" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="footnote-reference-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Duplicate target name, cannot be used as a unique reference: "1".
"""],
diff --git a/docutils/test/test_transforms/test_messages.py b/docutils/test/test_transforms/test_messages.py
index dcb540a0a..7a315bc05 100755
--- a/docutils/test/test_transforms/test_messages.py
+++ b/docutils/test/test_transforms/test_messages.py
@@ -38,7 +38,7 @@ document by the test framework.)
<document source="test data">
<paragraph>
This \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
|unknown substitution|
will generate a system message, thanks to
the \n\
@@ -55,7 +55,7 @@ document by the test framework.)
<section classes="system-messages">
<title>
Docutils System Messages
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Undefined substitution referenced: "unknown substitution".
"""],
diff --git a/docutils/test/test_transforms/test_peps.py b/docutils/test/test_transforms/test_peps.py
index 7f17ea69c..5057f83ca 100755
--- a/docutils/test/test_transforms/test_peps.py
+++ b/docutils/test/test_transforms/test_peps.py
@@ -48,14 +48,14 @@ A "References" section should be generated.
<reference name="reference" refname="reference">
reference
\n\
- <footnote_reference auto="1" ids="id3" refname="TARGET_NOTE: id2">
+ <footnote_reference auto="1" ids="footnote-reference-1" refname="TARGET_NOTE: footnote-1">
.
A "References" section should be generated.
<target ids="reference" names="reference" refuri="http://www.example.org">
- <section ids="id1">
+ <section ids="section-1">
<title>
References
- <footnote auto="1" ids="id2" names="TARGET_NOTE:\\ id2">
+ <footnote auto="1" ids="footnote-1" names="TARGET_NOTE:\\ footnote-1">
<paragraph>
<reference refuri="http://www.example.org">
http://www.example.org
diff --git a/docutils/test/test_transforms/test_sectnum.py b/docutils/test/test_transforms/test_sectnum.py
index 3f80b61f8..c2b3ac1bf 100755
--- a/docutils/test/test_transforms/test_sectnum.py
+++ b/docutils/test/test_transforms/test_sectnum.py
@@ -170,49 +170,49 @@ u"""\
<bullet_list classes="auto-toc">
<list_item>
<paragraph>
- <reference ids="id1" refid="title-1">
+ <reference ids="toc-entry-1" refid="title-1">
<generated classes="sectnum">
1\u00a0\u00a0\u00a0
Title 1
<bullet_list classes="auto-toc">
<list_item>
<paragraph>
- <reference ids="id2" refid="title-2">
+ <reference ids="toc-entry-2" refid="title-2">
<generated classes="sectnum">
1.1\u00a0\u00a0\u00a0
Title 2
<bullet_list>
<list_item>
<paragraph>
- <reference ids="id3" refid="title-3">
+ <reference ids="toc-entry-3" refid="title-3">
Title 3
<list_item>
<paragraph>
- <reference ids="id4" refid="title-4">
+ <reference ids="toc-entry-4" refid="title-4">
<generated classes="sectnum">
1.2\u00a0\u00a0\u00a0
Title 4
<section ids="title-1" names="title\\ 1">
- <title auto="1" refid="id1">
+ <title auto="1" refid="toc-entry-1">
<generated classes="sectnum">
1\u00a0\u00a0\u00a0
Title 1
<paragraph>
Paragraph 1.
<section ids="title-2" names="title\\ 2">
- <title auto="1" refid="id2">
+ <title auto="1" refid="toc-entry-2">
<generated classes="sectnum">
1.1\u00a0\u00a0\u00a0
Title 2
<paragraph>
Paragraph 2.
<section ids="title-3" names="title\\ 3">
- <title refid="id3">
+ <title refid="toc-entry-3">
Title 3
<paragraph>
Paragraph 3.
<section ids="title-4" names="title\\ 4">
- <title auto="1" refid="id4">
+ <title auto="1" refid="toc-entry-4">
<generated classes="sectnum">
1.2\u00a0\u00a0\u00a0
Title 4
diff --git a/docutils/test/test_transforms/test_smartquotes.py b/docutils/test/test_transforms/test_smartquotes.py
index 1ed8880b5..5a8a3c175 100644
--- a/docutils/test/test_transforms/test_smartquotes.py
+++ b/docutils/test/test_transforms/test_smartquotes.py
@@ -335,7 +335,7 @@ u"""\
.
<paragraph>
Test around inline elements:
- <footnote_reference auto="*" ids="id1">
+ <footnote_reference auto="*" ids="footnote-reference-1">
<paragraph>
<emphasis>
emphasized
@@ -355,7 +355,7 @@ u"""\
O and \n\
<math>
x^2
- <footnote auto="*" ids="id2">
+ <footnote auto="*" ids="footnote-1">
<paragraph>
and footnotes
"""],
diff --git a/docutils/test/test_transforms/test_substitution_expansion_length_limit.py b/docutils/test/test_transforms/test_substitution_expansion_length_limit.py
index 3023182a8..43c83a15a 100644
--- a/docutils/test/test_transforms/test_substitution_expansion_length_limit.py
+++ b/docutils/test/test_transforms/test_substitution_expansion_length_limit.py
@@ -56,10 +56,10 @@ The billion laughs attack for ReStructuredText:
<paragraph>
lol
\n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
|c|
continuation text
- <system_message backrefs="id2" ids="id1" level="3" line="9" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="9" source="test data" type="ERROR">
<paragraph>
Substitution definition "c" exceeds the line-length-limit.
""".format(b, c)],
diff --git a/docutils/test/test_transforms/test_substitutions.py b/docutils/test/test_transforms/test_substitutions.py
index 1bb0634d2..abad8c311 100755
--- a/docutils/test/test_transforms/test_substitutions.py
+++ b/docutils/test/test_transforms/test_substitutions.py
@@ -46,10 +46,10 @@ Here's an |unknown| substitution.
<document source="test data">
<paragraph>
Here's an \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
|unknown|
substitution.
- <system_message backrefs="id2" ids="id1" level="3" line="1" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="1" source="test data" type="ERROR">
<paragraph>
Undefined substitution referenced: "unknown".
"""],
@@ -205,28 +205,28 @@ Use |sub| and |indirect1| and |sub| again (and |sub| one more time).
.. |sub| replace:: |indirect1|
<paragraph>
Use \n\
- <problematic ids="id8" refid="id7">
+ <problematic ids="problematic-4" refid="system-message-4">
|Sub|
and \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
|indirect1|
and \n\
- <problematic ids="id4" refid="id3">
+ <problematic ids="problematic-2" refid="system-message-2">
|sub|
again (and \n\
- <problematic ids="id6" refid="id5">
+ <problematic ids="problematic-3" refid="system-message-3">
|sub|
one more time).
- <system_message backrefs="id2" ids="id1" level="3" line="5" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="5" source="test data" type="ERROR">
<paragraph>
Circular substitution definition referenced: "indirect1".
- <system_message backrefs="id4" ids="id3" level="3" line="5" source="test data" type="ERROR">
+ <system_message backrefs="problematic-2" ids="system-message-2" level="3" line="5" source="test data" type="ERROR">
<paragraph>
Circular substitution definition referenced: "sub".
- <system_message backrefs="id6" ids="id5" level="3" line="5" source="test data" type="ERROR">
+ <system_message backrefs="problematic-3" ids="system-message-3" level="3" line="5" source="test data" type="ERROR">
<paragraph>
Circular substitution definition referenced: "sub".
- <system_message backrefs="id8" ids="id7" level="3" line="5" source="test data" type="ERROR">
+ <system_message backrefs="problematic-4" ids="system-message-4" level="3" line="5" source="test data" type="ERROR">
<paragraph>
Circular substitution definition referenced: "Sub".
"""],
@@ -347,9 +347,9 @@ Make sure this substitution definition is not registered: |target|
.. |target| replace:: _`target`
<paragraph>
Make sure this substitution definition is not registered: \n\
- <problematic ids="id2" refid="id1">
+ <problematic ids="problematic-1" refid="system-message-1">
|target|
- <system_message backrefs="id2" ids="id1" level="3" line="5" source="test data" type="ERROR">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="3" line="5" source="test data" type="ERROR">
<paragraph>
Undefined substitution referenced: "target".
"""],
diff --git a/docutils/test/test_transforms/test_target_notes.py b/docutils/test/test_transforms/test_target_notes.py
index cfd22a858..21d4d6b43 100755
--- a/docutils/test/test_transforms/test_target_notes.py
+++ b/docutils/test/test_transforms/test_target_notes.py
@@ -47,9 +47,9 @@ A reference to a target_.
<reference name="target" refuri="http://example.org">
target
\n\
- <footnote_reference auto="1" ids="id2" refid="id1">
+ <footnote_reference auto="1" ids="footnote-reference-1" refid="footnote-1">
.
- <footnote auto="1" ids="id1" names="TARGET_NOTE:\\ id1">
+ <footnote auto="1" ids="footnote-1" names="TARGET_NOTE:\\ footnote-1">
<paragraph>
<reference refuri="http://example.org">
http://example.org
@@ -70,9 +70,9 @@ A reference to a target_.
target
<inline classes="custom">
\n\
- <footnote_reference auto="1" classes="custom" ids="id2" refid="id1">
+ <footnote_reference auto="1" classes="custom" ids="footnote-reference-1" refid="footnote-1">
.
- <footnote auto="1" ids="id1" names="TARGET_NOTE:\\ id1">
+ <footnote auto="1" ids="footnote-1" names="TARGET_NOTE:\\ footnote-1">
<paragraph>
<reference refuri="http://example.org">
http://example.org
diff --git a/docutils/test/test_writers/test_latex2e.py b/docutils/test/test_writers/test_latex2e.py
index 9f7ea03a9..dc58b806b 100755
--- a/docutils/test/test_writers/test_latex2e.py
+++ b/docutils/test/test_writers/test_latex2e.py
@@ -252,13 +252,13 @@ head_template.substitute(dict(parts,
\endgroup%
}
""")) + r"""%
-\DUfootnotetext{id1}{id1}{1}{%
+\DUfootnotetext{footnote-1}{footnote-1}{1}{%
paragraph
}
%
-\DUfootnotetext{id2}{id2}{2}{}
+\DUfootnotetext{footnote-2}{footnote-2}{2}{}
%
-\DUfootnotetext{id3}{id3}{3}{
+\DUfootnotetext{footnote-3}{footnote-3}{3}{
\begin{enumerate}
\item enumeration
\end{enumerate}