|
From: <mi...@us...> - 2024-05-04 08:58:38
|
Revision: 9683
http://sourceforge.net/p/docutils/code/9683
Author: milde
Date: 2024-05-04 08:58:36 +0000 (Sat, 04 May 2024)
Log Message:
-----------
New SubStructural element category class.
Fix categories: (cf. docs/ref/doctree.txt)
`<docinfo>` is SubStructural, not Bibliographic.
`<transition>` is SubStructural, not Structural.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/nodes.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2024-05-04 08:58:27 UTC (rev 9682)
+++ trunk/docutils/HISTORY.txt 2024-05-04 08:58:36 UTC (rev 9683)
@@ -17,9 +17,22 @@
Release 0.22b.dev (unpublished)
===============================
-* Add tox.ini to pyproject.toml to be in sdist (bug #486).
-* Fix license issue (bug #487).
+* General
+ - Add tox.ini to pyproject.toml to be in sdist (bug #486).
+ - Fix license issue (bug #487).
+
+* docutils/nodes.py
+
+ - New `SubStructural` element category class.
+ - Fix element categories.
+
+* docutils/transforms/frontmatter.py
+
+ - Adapt `DocInfo` to fixed element categories.
+
+
+
Release 0.21.2 (2024-04-23)
===========================
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2024-05-04 08:58:27 UTC (rev 9682)
+++ trunk/docutils/docutils/nodes.py 2024-05-04 08:58:36 UTC (rev 9683)
@@ -1127,6 +1127,14 @@
"""
+class SubStructural:
+ """`Structural Subelements`__ are valid children of Structural Elements.
+
+ __ https://docutils.sourceforge.io/docs/ref/doctree.html
+ #structural-subelements
+ """
+
+
class Body:
"""`Body elements`__.
@@ -1583,8 +1591,8 @@
# Title Elements
# ================
-class title(Titular, PreBibliographic, TextElement): pass
-class subtitle(Titular, PreBibliographic, TextElement): pass
+class title(Titular, PreBibliographic, SubStructural, TextElement): pass
+class subtitle(Titular, PreBibliographic, SubStructural, TextElement): pass
class rubric(Titular, General, TextElement): pass
@@ -1592,7 +1600,7 @@
# Meta-Data Element
# ==================
-class meta(PreBibliographic, Element):
+class meta(PreBibliographic, SubStructural, Element):
"""Container for "invisible" bibliographic data, or meta-data."""
@@ -1600,7 +1608,7 @@
# Bibliographic Elements
# ========================
-class docinfo(Bibliographic, Element): pass
+class docinfo(SubStructural, Element): pass
class author(Bibliographic, TextElement): pass
class organization(Bibliographic, TextElement): pass
class address(Bibliographic, FixedTextElement): pass
@@ -1620,7 +1628,7 @@
# Decorative Elements
# =====================
-class decoration(PreBibliographic, Element):
+class decoration(PreBibliographic, SubStructural, Element):
"""Container for header and footer."""
def get_header(self):
@@ -1676,7 +1684,7 @@
"""
-class transition(Structural, Element):
+class transition(SubStructural, Element):
"""Transitions are breaks between untitled text parts.
A transition may not begin or end a section or document, nor may two
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|