SF.net SVN: docutils:[10154] trunk/docutils
milde--- via Docutils-checkins <[email protected]> Tue, 03 Jun 2025 21:10:47 +0000
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 10154
http://sourceforge.net/p/docutils/code/10154
Author: milde
Date: 2025-06-03 21:10:47 +0000 (Tue, 03 Jun 2025)
Log Message:
-----------
Documentation fixes and supplements.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/docs/ref/doctree.rst
trunk/docutils/docutils/transforms/references.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2025-06-02 19:20:47 UTC (rev 10153)
+++ trunk/docutils/HISTORY.rst 2025-06-03 21:10:47 UTC (rev 10154)
@@ -17,11 +17,10 @@
Release 0.22rc3 (unpublished)
=============================
-* docutils/writers/latex2e/__init__.py
+* docutils/parsers/rst/states.py
- - Replace `Writer.bibtex_reference_resolver()` with a transform.
- - `LaTeXTranslator.visit_inline()` now inserts labels for the
- node's IDs.
+ - Warn about duplicate name in references with embedded internal targets.
+ Fixes bug #502.
* docutils/transforms/references.py
@@ -28,9 +27,11 @@
- New transform `CitationReferences`. Marks citation_references
as resolved if BibTeX is used by the backend (LaTeX).
-* docutils/parsers/rst/states.py
+* docutils/writers/latex2e/__init__.py
- - Warn about duplicate name in references with embedded internal targets.
+ - Replace `Writer.bibtex_reference_resolver()` with a transform.
+ - `LaTeXTranslator.visit_inline()` now inserts labels for the
+ node's IDs.
* docutils/writers/manpage.py
Modified: trunk/docutils/docs/ref/doctree.rst
===================================================================
--- trunk/docutils/docs/ref/doctree.rst 2025-06-02 19:20:47 UTC (rev 10153)
+++ trunk/docutils/docs/ref/doctree.rst 2025-06-03 21:10:47 UTC (rev 10154)
@@ -3192,7 +3192,7 @@
===========
The <reference> element represents a cross reference
-to another element of the document or to an external source.
+to another element of the document or to an external ressource.
:Category: `Simple Body Elements`_, `Inline Elements`_
:Analogues: The <reference> element is analogous to the DocBook_ <link>
@@ -3216,12 +3216,12 @@
underscore::
References may use simple_ reference names,
- `phrase refs`_, or `no reference name`__.
+ `phrase references`_, or `no reference name`__.
Matching targets must exist in the document, e.g., a
_`simple` inline target or the explicit targets below.
- .. _phrase refs: doctree.rst
+ .. _phrase references: doctree.rst
__ http://example.org
Pseudo-XML_ fragment from simple parsing::
@@ -3231,8 +3231,8 @@
<reference refname="simple">
simple
reference names,
- <reference refname="phrase refs">
- phrase refs
+ <reference refname="phrase references">
+ phrase references
, or
<reference anonymous="1">
no reference name
@@ -3254,7 +3254,7 @@
simple
reference names,
<reference refuri="doctree.rst">
- phrase refs
+ phrase references
, or
<reference anonymous="1" refuri="http://example.org">
no reference name
Modified: trunk/docutils/docutils/transforms/references.py
===================================================================
--- trunk/docutils/docutils/transforms/references.py 2025-06-02 19:20:47 UTC (rev 10153)
+++ trunk/docutils/docutils/transforms/references.py 2025-06-03 21:10:47 UTC (rev 10154)
@@ -79,6 +79,9 @@
next_node.expect_referenced_by_id.update(
getattr(target, 'expect_referenced_by_id', {}))
# Remove target node from places where it is invalid.
+ # TODO: always remove target?
+ # +1 It did complete its mission and is currently ignored.
+ # -1 It may help a future rST writer.
if isinstance(target.parent, nodes.figure) and isinstance(
next_node, nodes.caption):
target.parent.remove(target)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.