You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
(106) |
May
(215) |
Jun
(104) |
Jul
(290) |
Aug
(351) |
Sep
(245) |
Oct
(289) |
Nov
(184) |
Dec
(113) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(179) |
Feb
(88) |
Mar
(77) |
Apr
(70) |
May
(107) |
Jun
(288) |
Jul
(115) |
Aug
(67) |
Sep
(91) |
Oct
(34) |
Nov
(31) |
Dec
(61) |
| 2004 |
Jan
(54) |
Feb
(17) |
Mar
(102) |
Apr
(152) |
May
(178) |
Jun
(377) |
Jul
(136) |
Aug
(37) |
Sep
(196) |
Oct
(142) |
Nov
(119) |
Dec
(58) |
| 2005 |
Jan
(51) |
Feb
(76) |
Mar
(220) |
Apr
(132) |
May
(134) |
Jun
(230) |
Jul
(142) |
Aug
(58) |
Sep
(71) |
Oct
(76) |
Nov
(129) |
Dec
(117) |
| 2006 |
Jan
(94) |
Feb
(30) |
Mar
(97) |
Apr
(63) |
May
(63) |
Jun
(62) |
Jul
(23) |
Aug
(40) |
Sep
(47) |
Oct
(40) |
Nov
(23) |
Dec
(21) |
| 2007 |
Jan
(57) |
Feb
(65) |
Mar
(77) |
Apr
(23) |
May
(118) |
Jun
(127) |
Jul
(87) |
Aug
(33) |
Sep
(26) |
Oct
(8) |
Nov
(4) |
Dec
(25) |
| 2008 |
Jan
(16) |
Feb
(18) |
Mar
(16) |
Apr
(4) |
May
(22) |
Jun
(20) |
Jul
(38) |
Aug
(14) |
Sep
(18) |
Oct
(68) |
Nov
(16) |
Dec
(95) |
| 2009 |
Jan
(28) |
Feb
(16) |
Mar
(8) |
Apr
(44) |
May
(35) |
Jun
(41) |
Jul
(63) |
Aug
(40) |
Sep
(38) |
Oct
(41) |
Nov
(17) |
Dec
(9) |
| 2010 |
Jan
(9) |
Feb
(3) |
Mar
(71) |
Apr
(20) |
May
(15) |
Jun
(16) |
Jul
(33) |
Aug
(13) |
Sep
(39) |
Oct
(30) |
Nov
(25) |
Dec
(20) |
| 2011 |
Jan
(213) |
Feb
(252) |
Mar
(24) |
Apr
(24) |
May
(20) |
Jun
(21) |
Jul
(37) |
Aug
(18) |
Sep
(28) |
Oct
(65) |
Nov
(22) |
Dec
(48) |
| 2012 |
Jan
(35) |
Feb
(39) |
Mar
(17) |
Apr
(9) |
May
(37) |
Jun
(31) |
Jul
(23) |
Aug
(14) |
Sep
(16) |
Oct
(15) |
Nov
(5) |
Dec
(43) |
| 2013 |
Jan
(15) |
Feb
(19) |
Mar
(26) |
Apr
(13) |
May
(9) |
Jun
(11) |
Jul
(32) |
Aug
(9) |
Sep
(6) |
Oct
|
Nov
(13) |
Dec
(5) |
| 2014 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(18) |
Aug
|
Sep
|
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2015 |
Jan
(3) |
Feb
(25) |
Mar
(49) |
Apr
(28) |
May
(13) |
Jun
(2) |
Jul
(2) |
Aug
(14) |
Sep
(9) |
Oct
(6) |
Nov
|
Dec
(2) |
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
(12) |
Jun
|
Jul
(17) |
Aug
(7) |
Sep
(3) |
Oct
(2) |
Nov
(5) |
Dec
(28) |
| 2017 |
Jan
(11) |
Feb
(6) |
Mar
(10) |
Apr
(10) |
May
(34) |
Jun
(32) |
Jul
(15) |
Aug
(28) |
Sep
(8) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
| 2018 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(7) |
Aug
|
Sep
(1) |
Oct
|
Nov
(15) |
Dec
|
| 2019 |
Jan
|
Feb
(7) |
Mar
(2) |
Apr
(2) |
May
(2) |
Jun
(2) |
Jul
(48) |
Aug
(73) |
Sep
(22) |
Oct
(8) |
Nov
(16) |
Dec
(26) |
| 2020 |
Jan
(30) |
Feb
(13) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(12) |
Aug
(18) |
Sep
(18) |
Oct
(5) |
Nov
(9) |
Dec
(16) |
| 2021 |
Jan
(13) |
Feb
(17) |
Mar
(19) |
Apr
(70) |
May
(43) |
Jun
(27) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(37) |
Nov
(38) |
Dec
(11) |
| 2022 |
Jan
(73) |
Feb
(18) |
Mar
(36) |
Apr
(6) |
May
(8) |
Jun
(33) |
Jul
(22) |
Aug
|
Sep
(6) |
Oct
(71) |
Nov
(91) |
Dec
(26) |
| 2023 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(34) |
May
(29) |
Jun
(27) |
Jul
(3) |
Aug
(17) |
Sep
(11) |
Oct
(4) |
Nov
(34) |
Dec
(7) |
| 2024 |
Jan
(16) |
Feb
(27) |
Mar
(60) |
Apr
(57) |
May
(55) |
Jun
(50) |
Jul
(36) |
Aug
(108) |
Sep
(27) |
Oct
(33) |
Nov
(15) |
Dec
(14) |
| 2025 |
Jan
(2) |
Feb
(7) |
Mar
(49) |
Apr
(51) |
May
(35) |
Jun
(34) |
Jul
(10) |
Aug
(32) |
Sep
(27) |
Oct
(1) |
Nov
(13) |
Dec
(12) |
| 2026 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <mi...@us...> - 2026-01-07 13:43:04
|
Revision: 10289
http://sourceforge.net/p/docutils/code/10289
Author: milde
Date: 2026-01-07 13:43:01 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
Small documentation updates.
Announce change to "rubric" styling in HTML5.
Clarify the relationship between the `<address>` Doctree element
and `<address>` HTML element.
Update some comments and docstrings.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docs/ref/doctree.rst
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/transforms/references.py
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-01-07 13:42:50 UTC (rev 10288)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-01-07 13:43:01 UTC (rev 10289)
@@ -117,7 +117,7 @@
"True" in Docutils 1.0.
- Prefer explicit reference names as base for an HTML element's ID
- in Docutils 1.0. No change for internal cross-references.
+ in Docutils 1.0. No change for internal cross-references.
Cf. `Sphinx issue #1961`__
__ https://github.com/sphinx-doc/sphinx/issues/1961
@@ -131,6 +131,9 @@
- Change the default value of the initial_header_level_ setting to "auto"
(<h2> if there is a document title, else <h1>) in Docutils 1.0.
+ - Use normal font size and colour for informal titles of type "rubric"
+ in Docutils 1.0.
+
- Remove option ``--embed-images`` (obsoleted by "image_loading_")
in Docutils 2.0.
Modified: trunk/docutils/docs/ref/doctree.rst
===================================================================
--- trunk/docutils/docs/ref/doctree.rst 2026-01-07 13:42:50 UTC (rev 10288)
+++ trunk/docutils/docs/ref/doctree.rst 2026-01-07 13:43:01 UTC (rev 10289)
@@ -438,6 +438,8 @@
:Category: `Bibliographic Elements`_
:Analogues: <address> is analogous to the DocBook_ <address> element.
+ The HTML_ <address> element, in contrast, is analogous
+ to the `<contact>`_ element.
:Processing: As with the `\<literal_block>`_ element, newlines are
significant and must be preserved.
However, a monospaced typeface should not be used.
@@ -1083,8 +1085,8 @@
It is typically used for an email or web address.
:Category: `Bibliographic Elements`_
-:Analogues: <contact> is analogous to the DocBook_ <email> element.
- The HTML_ <address> element serves a similar purpose.
+:Analogues: <contact> is analogous to the DocBook_ <email> element
+ and the HTML_ <address> element.
:Processing: See `\<docinfo>`_.
:Parents: `\<docinfo>`_, `\<authors>`_
:Children: text data plus `inline elements`_ (`%text.model`_)
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2026-01-07 13:42:50 UTC (rev 10288)
+++ trunk/docutils/docutils/nodes.py 2026-01-07 13:43:01 UTC (rev 10289)
@@ -1746,7 +1746,7 @@
"""Mapping of names to lists of referencing nodes."""
self.refids: dict[str, list[Element]] = {}
- """Mapping of ids to lists of referencing nodes."""
+ """(Incomplete) Mapping of ids to lists of referencing nodes."""
self.nameids: dict[str, str] = {}
"""Mapping of names to unique id's."""
Modified: trunk/docutils/docutils/transforms/references.py
===================================================================
--- trunk/docutils/docutils/transforms/references.py 2026-01-07 13:42:50 UTC (rev 10288)
+++ trunk/docutils/docutils/transforms/references.py 2026-01-07 13:43:01 UTC (rev 10289)
@@ -81,6 +81,7 @@
# Remove target node from places where it is invalid.
# TODO: always remove target?
# +1 It did complete its mission and is currently ignored.
+ # (except for the Sphinx LaTeX writer)
# -1 It may help a future rST writer.
if isinstance(target.parent, nodes.figure) and isinstance(
next_node, nodes.caption):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 13:42:55
|
Revision: 10288
http://sourceforge.net/p/docutils/code/10288
Author: milde
Date: 2026-01-07 13:42:50 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
Doctree documentation: Include entity definitions from ``docutils.dtd``.
Modified Paths:
--------------
trunk/docutils/docs/ref/doctree.rst
Modified: trunk/docutils/docs/ref/doctree.rst
===================================================================
--- trunk/docutils/docs/ref/doctree.rst 2026-01-07 13:40:59 UTC (rev 10287)
+++ trunk/docutils/docs/ref/doctree.rst 2026-01-07 13:42:50 UTC (rev 10288)
@@ -5522,6 +5522,12 @@
The ``%bibliographic.elements`` parameter entity contains an OR-list of all
`Bibliographic Elements`_.
+
+.. include:: docutils.dtd
+ :start-after: <!ENTITY % additional.bibliographic.elements "">
+ :end-before:
+ :literal:
+
The `%additional.bibliographic.elements`_ placeholder can be used by
wrapper DTDs to extend ``%bibliographic.elements``.
@@ -5533,8 +5539,13 @@
------------------
The ``%body.elements`` parameter entity contains an OR-list of all
-`Body Elements`_.
+`Body Elements`_:
+.. include:: docutils.dtd
+ :start-after: <!ENTITY % additional.body.elements "">
+ :end-before:
+ :literal:
+
The `%additional.body.elements`_ placeholder can be used by
wrapper DTDs to extend ``%body.elements``.
@@ -5557,6 +5568,12 @@
The ``%inline.elements`` parameter entity contains an OR-list of all
`Inline Elements`_.
+
+.. include:: docutils.dtd
+ :start-after: <!ENTITY % additional.inline.elements "">
+ :end-before:
+ :literal:
+
The `%additional.inline.elements`_ placeholder can be used by
wrapper DTDs to extend ``%inline.elements``.
@@ -5569,6 +5586,12 @@
The ``%section.elements`` parameter entity contains the `\<section>`_
element.
+
+.. include:: docutils.dtd
+ :start-after: <!ENTITY % additional.section.elements "">
+ :end-before:
+ :literal:
+
The `%additional.section.elements`_ placeholder can be used
by wrapper DTDs to extend ``%section.elements``.
@@ -5618,14 +5641,13 @@
followed by zero or more sections (whose contents include this model),
or transitions.
-The actual entity definition is more complex,
+The actual definition is more complex,
-.. parsed-literal::
+.. include:: docutils.dtd
+ :start-after: <!-- The structure model may not end with a transition. -->
+ :end-before:
+ :literal:
- ( ( (`%body.elements`_; | topic | sidebar)+, transition? )*,
- ( (`%section.elements`_;),
- (transition?, (`%section.elements`_;) )* )? )
-
because there are additional restrictions on `\<transition>`_\ s.
[#extra-rule]_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 13:41:01
|
Revision: 10287
http://sourceforge.net/p/docutils/code/10287
Author: milde
Date: 2026-01-07 13:40:59 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
Use name of custom role based on "code" as its language default.
Now,
.. role:: python(code)
suffices to define a role with syntax highlight for Python code.
Turn off syntax highlight with `:langauge: none`.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docs/ref/rst/directives.rst
trunk/docutils/docs/ref/rst/roles.rst
trunk/docutils/docutils/parsers/rst/roles.py
trunk/docutils/test/test_parsers/test_rst/test_interpreted.py
trunk/docutils/test/test_transforms/test_smartquotes.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-01-07 13:40:45 UTC (rev 10286)
+++ trunk/docutils/HISTORY.rst 2026-01-07 13:40:59 UTC (rev 10287)
@@ -32,6 +32,11 @@
- Add source and line info to <table> elements.
- Remove `CSVTable.check_requirements()` (not required with Python 3).
+* docutils/parsers/rst/roles.py
+
+ - Use the name of a custom role based on "code" as default for its
+ highlight language.
+
* docutils/parsers/rst/states.py
- Add source and line info to <table> elements.
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-01-07 13:40:45 UTC (rev 10286)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-01-07 13:40:59 UTC (rev 10287)
@@ -86,9 +86,6 @@
* The "rst" parser will warn, if a directive that does not take arguments
has content above and below directive options in Docutils 0.23.
-* The highlight language of a custom role based on "code" will default to
- the role's name in Docutils 0.23.
-
* The "rst" parser will warn if a `"figure"`_ directive is missing both
caption and legend in Docutils 1.0.
@@ -293,6 +290,9 @@
- Problems with the "include" directive are reported as ERROR, not SEVERE.
- The "include" directive options :start-after: and :end-before: may now
also be used without value (standing for an empty line).
+ - The highlight language of a custom role based on the `"code" role`_
+ defaults to the role's name (if supported by Pygments_).
+ Specifying ``:language: none`` turns off syntax highlight.
LaTeX writer:
- Only write ``\label`` commands for explicit IDs and IDs that are
@@ -1585,6 +1585,7 @@
docs/ref/rst/directives.html#including-an-external-document-fragment
.. _"widths" option: docs/ref/rst/directives.html#table
+.. _"code" role: docs/ref/rst/roles.html#code
.. _standard definition file:
.. _standard definition files: docs/ref/rst/definitions.html
.. _LaTeX syntax for mathematics: docs/ref/rst/mathematics.html
Modified: trunk/docutils/docs/ref/rst/directives.rst
===================================================================
--- trunk/docutils/docs/ref/rst/directives.rst 2026-01-07 13:40:45 UTC (rev 10286)
+++ trunk/docutils/docs/ref/rst/directives.rst 2026-01-07 13:40:59 UTC (rev 10287)
@@ -2047,22 +2047,22 @@
<inline classes="special">
interpreted text
- The "class" option is recognized with all interpreted text roles.
+ Recognized with all interpreted text roles.
_`format` : space-separated list of output format names (`writer names`_)
Specify the generated <raw> element's `format attribute`_.
- Only recognized with the `"raw" <"raw" role_>`__ base role.
+ Recognized with the `"raw" <"raw" role_>`__ base role.
-_`language` : text_ (formal language)
- Name of a formal language, passed to Pygments_ for syntax highlighting.
+_`language` : text_ (formal language or "none")
+ Name of a formal language, passed to Pygments_ for syntax highlighting
+ or "none" for no syntax highlighting.
+ The default is the role name (since Docutils 0.23).
See `supported languages and markup formats`_ for recognized values.
- Only recognized with the `"code" <"code" role>`__ base role.
+ Recognized with the `"code" <"code" role_>`__ base role.
-.. _writer names: ../../user/config.html#writer-docutils-application
-
.. _default-role:
Setting the Default Interpreted Text Role
@@ -2386,6 +2386,7 @@
.. _toc_backlinks: ../../user/config.html#toc-backlinks
.. _use_latex_toc: ../../user/config.html#use-latex-toc
.. _validate: ../../user/config.html#validate
+.. _writer names: ../../user/config.html#writer-docutils-application
.. _reStructuredText Standard Definition Files: definitions.html
Modified: trunk/docutils/docs/ref/rst/roles.rst
===================================================================
--- trunk/docutils/docs/ref/rst/roles.rst 2026-01-07 13:40:45 UTC (rev 10286)
+++ trunk/docutils/docs/ref/rst/roles.rst 2026-01-07 13:40:59 UTC (rev 10287)
@@ -77,24 +77,30 @@
:Customization_ options: `class <"class" option_>`__,
`language <"language" option_>`__
-(New in Docutils 0.9.)
-
The :code: role marks its content as code in a formal language.
-For syntax highlight of inline code, the `"role" directive`_ can
-be used to create `custom roles`_ with the code language specified
-in the `"language" option`_.
-For example, the following creates a LaTeX-specific "latex" role::
+For syntax highlight of inline code, the `"role" directive`_ can be
+used to create `custom roles`_. For example, the following creates
+a role "tex" to mark up and highlight LaTeX examples::
- .. role:: latex(code)
- :language: latex
+ .. role:: tex(code)
+A different `highlight language`_ can be specified in the
+`"language" option`_::
+
+ .. role:: js(code)
+ :language: javascript+mozpreproc
+
Content of the new role is parsed and tagged by the Pygments_ syntax
-highlighter. See the `"code" directive`_ for more info on parsing
-and display of code in reStructuredText.
+highlighter. See the `"code" directive`_ for more info on syntax highlight
+in Docutils.
+New in Docutils 0.9. Since Docutils 0.23, the highlight language of
+derived roles defaults to the role name.
+
.. _customization: `custom roles`_
.. _Pygments: https://pygments.org/
+.. _highlight language: https://pygments.org/languages/
----------
Modified: trunk/docutils/docutils/parsers/rst/roles.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/roles.py 2026-01-07 13:40:45 UTC (rev 10286)
+++ trunk/docutils/docutils/parsers/rst/roles.py 2026-01-07 13:40:59 UTC (rev 10287)
@@ -343,10 +343,14 @@
register_canonical_role('raw', raw_role)
-def code_role(role, rawtext, text, lineno, inliner,
+def code_role(role_name, rawtext, text, lineno, inliner,
options=None, content=None):
options = normalize_options(options)
- language = options.get('language', '')
+ # syntax highlight language (for derived custom roles)
+ language = role_name if role_name != 'code' else ''
+ language = options.get('language', language)
+ if language.lower() == 'none':
+ language = '' # disable syntax highlight
classes = ['code']
if 'classes' in options:
classes.extend(options['classes'])
@@ -356,9 +360,12 @@
tokens = Lexer(nodes.unescape(text, True), language,
inliner.document.settings.syntax_highlight)
except LexerError as error:
- msg = inliner.reporter.warning(error)
- prb = inliner.problematic(rawtext, rawtext, msg)
- return [prb], [msg]
+ if 'language' in options:
+ msg = inliner.reporter.warning(error)
+ prb = inliner.problematic(rawtext, rawtext, msg)
+ return [prb], [msg]
+ else:
+ tokens = [('', nodes.unescape(text, True))]
node = nodes.literal(rawtext, '', classes=classes)
Modified: trunk/docutils/test/test_parsers/test_rst/test_interpreted.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_interpreted.py 2026-01-07 13:40:45 UTC (rev 10286)
+++ trunk/docutils/test/test_parsers/test_rst/test_interpreted.py 2026-01-07 13:40:59 UTC (rev 10287)
@@ -24,6 +24,8 @@
class ParserTestCase(unittest.TestCase):
+ maxDiff = None
+
def test_parser(self):
parser = Parser()
settings = get_default_settings(Parser)
@@ -69,8 +71,8 @@
<title_reference>
interpreted
"""],
-["""\
-`interpreted \\`title``
+[r"""
+`interpreted \`title``
""",
"""\
<document source="test data">
@@ -87,8 +89,8 @@
<title_reference>
:not-role: interpreted
"""],
-["""\
-`interpreted` but not \\`interpreted` [`] or ({[`] or [`]}) or `
+[r"""
+`interpreted` but not \`interpreted` [`] or ({[`] or [`]}) or `
""",
"""\
<document source="test data">
@@ -147,8 +149,8 @@
<paragraph>
:title:`` (empty interpreted text not recognized)
"""],
-["""\
-:title:`\\ ` (interpreted text containing empty string)
+[r"""
+:title:`\ ` (interpreted text containing empty string)
""",
"""\
<document source="test data">
@@ -156,8 +158,8 @@
<title_reference>
(interpreted text containing empty string)
"""],
-["""\
-`\\ `:title: (interpreted text containing empty string (postfix))
+[r"""
+`\ `:title: (interpreted text containing empty string (postfix))
""",
"""\
<document source="test data">
@@ -165,8 +167,8 @@
<title_reference>
(interpreted text containing empty string (postfix))
"""],
-["""\
-:title:`\\ non-empty`
+[r"""
+:title:`\ non-empty`
""",
"""\
<document source="test data">
@@ -174,8 +176,8 @@
<title_reference>
non-empty
"""],
-["""\
-:title:`\\ ` (trailing unquoted space)
+[r"""
+:title:`\ ` (trailing unquoted space)
""",
"""\
<document source="test data">
@@ -184,7 +186,7 @@
<problematic ids="problematic-1" refid="system-message-1">
`
` (trailing unquoted space)
- <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="1" source="test data" type="WARNING">
+ <system_message backrefs="problematic-1" ids="system-message-1" level="2" line="2" source="test data" type="WARNING">
<paragraph>
Inline interpreted text or phrase reference start-string without end-string.
"""],
@@ -239,9 +241,9 @@
]
totest['code'] = [
-["""\
+[r"""
Code role for inline code snippets:
-:code:`$\alpha = \\int_0^\\infty f(x) dx$`.
+:code:`$\alpha = \int_0^\infty f(x) dx$`.
""",
"""\
<document source="test data">
@@ -248,7 +250,7 @@
<paragraph>
Code role for inline code snippets:
<literal classes="code">
- $\x07lpha = \\int_0^\\infty f(x) dx$
+ $\\alpha = \\int_0^\\infty f(x) dx$
.
"""],
]
@@ -288,7 +290,6 @@
Custom role based on code role:
.. role:: python(code)
- :language: python3
:class: testclass
Python code :python:`print("The end")`.
@@ -299,7 +300,7 @@
Custom role based on code role:
<paragraph>
Python code \n\
- <literal classes="code testclass python3">
+ <literal classes="code testclass python">
<inline classes="name builtin">
print
<inline classes="punctuation">
@@ -310,6 +311,24 @@
)
.
"""],
+["""\
+Turn off syntax highlight with language "none".
+
+.. role:: python(code)
+ :language: none
+
+Python code :python:`print("The end")`.
+""",
+"""\
+<document source="test data">
+ <paragraph>
+ Turn off syntax highlight with language "none".
+ <paragraph>
+ Python code \n\
+ <literal classes="code python">
+ print("The end")
+ .
+"""],
]
totest['references'] = [
Modified: trunk/docutils/test/test_transforms/test_smartquotes.py
===================================================================
--- trunk/docutils/test/test_transforms/test_smartquotes.py 2026-01-07 13:40:45 UTC (rev 10286)
+++ trunk/docutils/test/test_transforms/test_smartquotes.py 2026-01-07 13:40:59 UTC (rev 10287)
@@ -39,6 +39,7 @@
settings = get_default_settings(Parser)
settings.warning_stream = ''
settings.smart_quotes = True
+ settings.syntax_highlight = 'none'
settings.trim_footnote_ref_space = True
for name, (transforms, cases) in totest.items():
for casenum, (case_input, case_expected) in enumerate(cases):
@@ -131,7 +132,6 @@
"literal" blocks.
.. role:: python(code)
- :class: python
Keep quotes straight in code and math:
:code:`print "hello"` :python:`print("hello")` :math:`1' 12"`.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 13:40:47
|
Revision: 10286
http://sourceforge.net/p/docutils/code/10286
Author: milde
Date: 2026-01-07 13:40:45 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
nodes.Element.findall() now accepts also a tuple of types as condition.
The "condition" argument to the may also be a tuple of node classes
It is converted to ``isinstance(node, class_or_tuple)``.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/docutils/nodes.py
trunk/docutils/test/test_nodes.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-01-07 07:52:49 UTC (rev 10285)
+++ trunk/docutils/HISTORY.rst 2026-01-07 13:40:45 UTC (rev 10286)
@@ -51,6 +51,10 @@
- Ensure `FileInput.read()` returns a `str` (decode if `source.read`
returns `bytes`. Fixes bug #514.
+* docutils/nodes.py
+
+ - Element.findall() now accepts also a tuple of types as condition.
+
* docutils/parsers/rst/directives/body.py,
docutils/parsers/rst/directives/parts.py
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2026-01-07 07:52:49 UTC (rev 10285)
+++ trunk/docutils/docutils/nodes.py 2026-01-07 13:40:45 UTC (rev 10286)
@@ -245,7 +245,7 @@
visitor.dispatch_departure(self)
return stop
- def _fast_findall(self, cls: type) -> Iterator:
+ def _fast_findall(self, cls: type|tuple[type]) -> Iterator:
"""Return iterator that only supports instance checks."""
if isinstance(self, cls):
yield self
@@ -262,7 +262,7 @@
yield from child._superfast_findall()
def findall(self,
- condition: type | Callable[[Node], bool] | None = None,
+ condition: type|tuple[type]|Callable[[Node], bool]|None = None,
include_self: bool = True,
descend: bool = True,
siblings: bool = False,
@@ -279,9 +279,9 @@
their descendants (if also `descend` is true), and so on.
If `condition` is not None, the iterator yields only nodes
- for which ``condition(node)`` is true. If `condition` is a
- type ``cls``, it is equivalent to a function consisting
- of ``return isinstance(node, cls)``.
+ for which ``condition(node)`` is true.
+ If `condition` is a type (or tuple of types) ``cls``, it is equivalent
+ to a function consisting of ``return isinstance(node, cls)``.
If `ascend` is true, assume `siblings` to be true as well.
@@ -314,16 +314,16 @@
if condition is None:
yield from self._superfast_findall()
return
- elif isinstance(condition, type):
+ elif isinstance(condition, (type, tuple)):
yield from self._fast_findall(condition)
return
# Check if `condition` is a class (check for TypeType for Python
# implementations that use only new-style classes, like PyPy).
- if isinstance(condition, type):
- node_class = condition
+ if isinstance(condition, (type, tuple)):
+ class_or_tuple = condition
- def condition(node, node_class=node_class):
- return isinstance(node, node_class)
+ def condition(node, class_or_tuple=class_or_tuple):
+ return isinstance(node, class_or_tuple)
if include_self and (condition is None or condition(self)):
yield self
@@ -349,13 +349,14 @@
else:
node = node.parent
- def traverse(self,
- condition: type | Callable[[Node], bool] | None = None,
- include_self: bool = True,
- descend: bool = True,
- siblings: bool = False,
- ascend: bool = False,
- ) -> list:
+ def traverse(
+ self,
+ condition: type|tuple[type]|Callable[[Node], bool]|None = None,
+ include_self: bool = True,
+ descend: bool = True,
+ siblings: bool = False,
+ ascend: bool = False,
+ ) -> list:
"""Return list of nodes following `self`.
For looping, Node.findall() is faster and more memory efficient.
@@ -366,13 +367,14 @@
return list(self.findall(condition, include_self, descend,
siblings, ascend))
- def next_node(self,
- condition: type | Callable[[Node], bool] | None = None,
- include_self: bool = False,
- descend: bool = True,
- siblings: bool = False,
- ascend: bool = False,
- ) -> Node | None:
+ def next_node(
+ self,
+ condition: type|tuple[type]|Callable[[Node], bool]|None = None,
+ include_self: bool = False,
+ descend: bool = True,
+ siblings: bool = False,
+ ascend: bool = False,
+ ) -> Node | None:
"""
Return the first node in the iterator returned by findall(),
or None if the iterable is empty.
Modified: trunk/docutils/test/test_nodes.py
===================================================================
--- trunk/docutils/test/test_nodes.py 2026-01-07 07:52:49 UTC (rev 10285)
+++ trunk/docutils/test/test_nodes.py 2026-01-07 13:40:45 UTC (rev 10286)
@@ -58,6 +58,7 @@
self.assertEqual(list(e[0].findall()),
[e[0], e[0][0], e[0][1], e[0][1][0]])
self.testlist = [e[0][0], e[0][1]]
+ # Condition is function returning a boolean, class or tuple of classes:
self.assertEqual(list(e[0].findall(condition=self.not_in_testlist)),
[e[0], e[0][1][0]])
self.testlist.append(e[0][1][0])
@@ -64,6 +65,8 @@
self.assertEqual(list(e[0].findall(condition=self.not_in_testlist)),
[e[0]])
self.assertEqual(list(e.findall(nodes.TextElement)), [e[0][1]])
+ self.assertEqual(list(e.findall((nodes.TextElement, nodes.Text))),
+ [e[0][1], e[0][1][0]])
def test_findall_duplicate_texts(self):
e = nodes.Element()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 07:52:52
|
Revision: 10285
http://sourceforge.net/p/docutils/code/10285
Author: milde
Date: 2026-01-07 07:52:49 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
Move LaTeX styling for "html-roles" definitions to docutils.sty.
The "standard definition file" "html-roles.txt" contained a "raw" directive
with LaTeX macros for the styling of the "semantic markup" roles added by
this file. This leads to WARNING messages, if applications disable the "raw"
directive for security reasons.
Move the definitions to the LaTex package/stylefile "docutils.sty" and
ensure that relevant definitions are loaded on demand.
Nice side effects:
* works also if any of the roles are defined via the "role" directive
* less overhead if just some of the roles are used.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docs/ref/rst/definitions.rst
trunk/docutils/docutils/parsers/rst/include/html-roles.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/latex2e/docutils.sty
trunk/docutils/test/functional/expected/latex_cornercases.tex
trunk/docutils/test/functional/expected/latex_literal_block.tex
trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex
trunk/docutils/test/functional/expected/latex_literal_block_listings.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex
trunk/docutils/test/functional/expected/length_units_latex.tex
trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
trunk/docutils/test/functional/input/latex_cornercases.rst
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/HISTORY.rst 2026-01-07 07:52:49 UTC (rev 10285)
@@ -37,7 +37,12 @@
- Add source and line info to <table> elements.
- Fix bug #517: wrong "input_offset" when parsing table cell content.
+* docutils/writers/latex2e/*
+ - Default styling for "semantic inline markup roles" from the
+ ``html-roles.txt`` standard definition file.
+
+
Release 0.22.4 (2025-12-18)
===========================
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:52:49 UTC (rev 10285)
@@ -298,6 +298,8 @@
- Only write ``\label`` commands for explicit IDs and IDs that are
referenced in the current document (i.e. not for un-referenced
section titles).
+ - Support the "semantic inline markup roles" from the ``html-roles.txt``
+ `standard definition file`_.
Removed objects
`parsers.rst.directives.tables.CSVTable.check_requirements()`
@@ -1451,10 +1453,8 @@
* Length units are now supported for image_ sizes.
-* Added `standard definition files`__ for special characters etc.
+* Added `standard definition files`_ for special characters etc.
- __ docs/ref/rst/definitions.html
-
Internationalization:
* Added Japanese and Simplified Chinese language mappings, and support
@@ -1585,7 +1585,8 @@
docs/ref/rst/directives.html#including-an-external-document-fragment
.. _"widths" option: docs/ref/rst/directives.html#table
-.. _Standard definition file: docs/ref/rst/definitions.html
+.. _standard definition file:
+.. _standard definition files: docs/ref/rst/definitions.html
.. _LaTeX syntax for mathematics: docs/ref/rst/mathematics.html
.. _configuration settings: docs/user/config.html
Modified: trunk/docutils/docs/ref/rst/definitions.rst
===================================================================
--- trunk/docutils/docs/ref/rst/definitions.rst 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/docs/ref/rst/definitions.rst 2026-01-07 07:52:49 UTC (rev 10285)
@@ -172,9 +172,11 @@
.. _reStructuredText interpreted text roles: roles.html
-Additional roles for HTML
--------------------------
+.. _Additional roles for HTML:
+Semantic Inline Markup Roles
+----------------------------
+
The "html-roles.txt_" standard definitions file provides role
definitions for semantic `HTML inline markup elements`__ and
`tags for representation of edits to the document`__ that
@@ -182,16 +184,11 @@
(except for elements requiring an additional attribute).
The additional roles work out of the box with the `"html5" writer`_
-that selects the corresponding HTML element.
-LaTeX styling definitions are included. For best results add
-the LaTeX packages soul_ and xcolor_ to the `stylesheet setting`__.
+(selects the corresponding HTML element) and the LaTeX writers.
.. _html-roles.txt: ../../../docutils/parsers/rst/include/html-roles.txt
__ https://html.spec.whatwg.org/multipage/text-level-semantics.html
__ https://html.spec.whatwg.org/multipage/edits.html
-__ ../../user/config.html#stylesheet-2
-.. _soul: https://ctan.org/pkg/soul
-.. _xcolor: https://ctan.org/pkg/xcolor
.. class:: field-indent-4em
Modified: trunk/docutils/docutils/parsers/rst/include/html-roles.txt
===================================================================
--- trunk/docutils/docutils/parsers/rst/include/html-roles.txt 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/docutils/parsers/rst/include/html-roles.txt 2026-01-07 07:52:49 UTC (rev 10285)
@@ -18,28 +18,3 @@
.. role:: u
.. role:: s
.. role:: var
-
-.. raw:: latex
-
- % Definitions for semantic HTML inline markup and representation of edits
- % (standard definition file "html-roles.txt").
- % Add "soul" to the "stylesheet" setting for markup test that wraps
- % and "xcolor" for yellow highlighting with :mark:`me`.
- \providecommand{\DUroleb}{\textbf}
- \providecommand{\DUroledel}{\st}
- \providecommand{\DUroledfn}{\emph}
- \providecommand{\DUrolei}{\textit}
- \providecommand{\DUroleins}{\ul}
- \providecommand{\DUrolekbd}{\texttt}
- \providecommand{\DUrolemark}{\hl}
- \providecommand{\DUroleq}[1]{“#1”}
- \providecommand{\DUroles}{\st}
- \providecommand{\DUrolesmall}[1]{{\footnotesize #1}}
- \providecommand{\DUroleu}{\underline}
- \providecommand{\DUrolevar}{\textit}
- % fallback definitions
- \providecommand{\ul}{\underline}
- \providecommand{\hl}{\underline} % highlight/mark
- \providecommand{\st}[1]{% strikethrough
- \raisebox{1ex}{\underline{\smash{\raisebox{-1ex}{#1}}}}%
- }
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2026-01-07 07:52:49 UTC (rev 10285)
@@ -621,7 +621,7 @@
block_name = line.rstrip(':')
if not block_name:
continue
- definitions = _read_block(fp)
+ definitions = _read_block(fp) # all lines up to the next empty one
if block_name in ('color', 'float', 'table', 'textcomp'):
definitions = definitions.strip()
# print('Block: `%s`'% block_name)
@@ -1365,7 +1365,7 @@
else:
# require a minimal version:
self.fallbacks['_docutils.sty'] = (
- r'\usepackage{docutils}[2025-08-06]')
+ r'\usepackage{docutils}[2025-12-10]')
self.stylesheet = [self.stylesheet_call(path)
for path in stylesheet_list]
@@ -2556,6 +2556,12 @@
self.out.append(r'\foreignlanguage{%s}{' % language)
else:
self.provide_fallback('inline')
+ if hasattr(PreambleCmds, f'inline role {cls}'):
+ self.provide_fallback(f'inline role {cls}')
+ if cls in ('del', 'ins', 'mark', 's', 'u'):
+ self.requirements['soul'] = r'\usepackage{soul}'
+ if cls == 'mark':
+ self.requirements['color'] = PreambleCmds.color
self.out.append(r'\DUrole{%s}{' % cls)
def depart_inline(self, node) -> None:
Modified: trunk/docutils/docutils/writers/latex2e/docutils.sty
===================================================================
--- trunk/docutils/docutils/writers/latex2e/docutils.sty 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/docutils/writers/latex2e/docutils.sty 2026-01-07 07:52:49 UTC (rev 10285)
@@ -22,7 +22,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{docutils}
- [2025-08-06 macros for Docutils LaTeX output]
+ [2025-12-10 macros for Docutils LaTeX output]
% Helpers
% -------
@@ -149,6 +149,69 @@
\fi%
}
+% Definitions for `semantic HTML inline markup`__ and representation of edits
+%
+% __ https://docutils.sourceforge.io/docs/ref/rst/definitions.html#additional-roles-for-html
+
+% inline role b::
+
+\providecommand{\DUroleb}{\textbf}
+
+% inline role del::
+
+\providecommand{\DUroledel}{\st}
+
+% inline role dfn::
+
+\providecommand{\DUroledfn}{\emph}
+
+% inline role i::
+
+\providecommand{\DUrolei}{\textit}
+
+% inline role ins::
+
+\providecommand{\DUroleins}{\ul}
+
+% inline role kbd::
+
+\providecommand{\DUrolekbd}{\texttt}
+
+% inline role mark::
+
+\providecommand{\DUrolemark}{\hl}
+
+% inline role q::
+
+\providecommand{\DUroleq}[1]{“#1”}
+
+% inline role s::
+
+\providecommand{\DUroles}{\st}
+
+% inline role small::
+
+\providecommand{\DUrolesmall}[1]{{\footnotesize #1}}
+
+% inline role st::
+
+\providecommand{\DUroledel}{\st}
+
+% inline role u::
+
+\providecommand{\DUroleu}{\ul}
+
+% inline role var::
+
+\providecommand{\DUrolevar}{\textit}
+
+% Fallback hacks (Docutils loads "soul" for better implementation)
+\providecommand{\hl}{\underline}
+\providecommand{\st}[1]{%
+ \raisebox{1ex}{\underline{\smash{\raisebox{-1ex}{#1}}}}%
+}
+\providecommand{\ul}{\underline}
+
% legend::
% legend environment (in figures and formal tables)
Modified: trunk/docutils/test/functional/expected/latex_cornercases.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_cornercases.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/latex_cornercases.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -7,6 +7,7 @@
\DeclareUnicodeCharacter{2663}{\ensuremath{\clubsuit}}
\usepackage{alltt}
\usepackage{amsmath}
+\usepackage{color}
\usepackage{float} % extended float configuration
\floatplacement{figure}{H} % place figures here definitely
\usepackage{graphicx}
@@ -13,6 +14,7 @@
\usepackage{multirow}
\usepackage{pifont}
\setcounter{secnumdepth}{0}
+\usepackage{soul}
\usepackage{longtable,ltcaption,array}
\setlength{\extrarowheight}{2pt}
\newlength{\DUtablewidth} % internal use in tables
@@ -65,6 +67,39 @@
}
\fi
+% custom inline roles: \DUrole{#1}{#2} tries \DUrole#1{#2}
+\providecommand*{\DUrole}[2]{%
+ \ifcsname DUrole#1\endcsname%
+ \csname DUrole#1\endcsname{#2}%
+ \else%
+ #2%
+ \fi%
+}
+
+\providecommand{\DUroleb}{\textbf}
+
+\providecommand{\DUroledel}{\st}
+
+\providecommand{\DUroledfn}{\emph}
+
+\providecommand{\DUrolei}{\textit}
+
+\providecommand{\DUroleins}{\ul}
+
+\providecommand{\DUrolekbd}{\texttt}
+
+\providecommand{\DUrolemark}{\hl}
+
+\providecommand{\DUroleq}[1]{“#1”}
+
+\providecommand{\DUroles}{\st}
+
+\providecommand{\DUrolesmall}[1]{{\footnotesize #1}}
+
+\providecommand{\DUroleu}{\ul}
+
+\providecommand{\DUrolevar}{\textit}
+
% legend environment (in figures and formal tables)
\ifdefined\DUlegend
\else
@@ -290,6 +325,152 @@
\includegraphics[width=1\linewidth]{../../../docs/user/rst/images/title.png}
+\section{Additional text roles}
+
+Including the \textquotedbl{}html-roles.txt\textquotedbl{} standard definition file adds
+roles matching semantic HTML inline markup elements.
+
+% Standard definition file for additional roles matching HTML tags.
+%
+% :Copyright: © 2025 Günter Milde.
+% :License: Released under the terms of the
+% `2-Clause BSD license <http://www.spdx.org/licenses/BSD-2-Clause>`__
+
+\setlength{\DUtablewidth}{\dimexpr\linewidth-4\arrayrulewidth\relax}%
+\begin{longtable*}{|p{\DUcolumnwidth{0.102}}|p{\DUcolumnwidth{0.271}}|p{\DUcolumnwidth{0.627}}|}
+\hline
+\textbf{%
+Role
+} & \textbf{%
+Example
+} & \textbf{%
+Notes
+} \\
+\hline
+\endfirsthead
+\hline
+\textbf{%
+Role
+} & \textbf{%
+Example
+} & \textbf{%
+Notes
+} \\
+\hline
+\endhead
+\multicolumn{3}{p{\DUcolumnwidth{1.000}}}{\raggedleft\ldots continued on next page}\\
+\endfoot
+\endlastfoot
+
+del
+ &
+\DUrole{del}{removed}
+ &
+removed content
+ \\
+\hline
+
+ins
+ &
+\DUrole{ins}{inserted}
+ &
+editional additions
+ \\
+\hline
+
+b
+ &
+\DUrole{b}{keyword}
+ &
+highlight \DUrole{b}{key words}
+without marking them up as important
+ \\
+\hline
+
+dfn
+ &
+\DUrole{dfn}{dfn}
+ &
+the defining instance of a term
+ \\
+\hline
+
+i
+ &
+\DUrole{i}{rôle}
+ &
+\DUrole{i}{voix alternative}
+ \\
+\hline
+
+kbd
+ &
+\texttt{\DUrole{kbd}{Ctrl X}}
+ &
+user input
+ \\
+\hline
+
+mark
+ &
+\DUrole{mark}{up}
+ &
+highlight a \DUrole{mark}{run of text}
+ \\
+\hline
+
+q
+ &
+\DUrole{q}{Tagline!}
+ &
+content quoted from another source
+ \\
+\hline
+
+s
+ &
+\DUrole{s}{strike}
+ &
+text that is inaccurate or
+no longer relevant
+ \\
+\hline
+
+samp
+ &
+\texttt{\DUrole{samp}{Ready!}}
+ &
+computer output
+ \\
+\hline
+
+small
+ &
+\DUrole{small}{print}
+ &
+side comments
+ \\
+\hline
+
+u
+ &
+\DUrole{u}{anotation}
+ &
+unarticulated annotations of, e.g,
+\DUrole{u}{comon mispellings}
+ \\
+\hline
+
+var
+ &
+\DUrole{var}{n}
+ &
+variables (or constants)
+ \\
+\hline
+\end{longtable*}
+
+
\section{Tables}
In contrast to HTML, LaTeX does not support line-breaks in tables with
Modified: trunk/docutils/test/functional/expected/latex_literal_block.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/latex_literal_block.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -19,7 +19,7 @@
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
-\usepackage{docutils}[2025-08-06]
+\usepackage{docutils}[2025-12-10]
% character width in monospaced font
\newlength{\ttemwidth}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -19,7 +19,7 @@
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
-\usepackage{docutils}[2025-08-06]
+\usepackage{docutils}[2025-12-10]
% character width in monospaced font
\newlength{\ttemwidth}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_listings.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_listings.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/latex_literal_block_listings.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -25,7 +25,7 @@
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
-\usepackage{docutils}[2025-08-06]
+\usepackage{docutils}[2025-12-10]
% character width in monospaced font
\newlength{\ttemwidth}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -18,7 +18,7 @@
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
-\usepackage{docutils}[2025-08-06]
+\usepackage{docutils}[2025-12-10]
% character width in monospaced font
\newlength{\ttemwidth}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -19,7 +19,7 @@
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
-\usepackage{docutils}[2025-08-06]
+\usepackage{docutils}[2025-12-10]
% character width in monospaced font
\newlength{\ttemwidth}
Modified: trunk/docutils/test/functional/expected/length_units_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/length_units_latex.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/length_units_latex.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -22,7 +22,7 @@
\usepackage{nohyperref}
%%% Fallback definitions for Docutils-specific commands
-\usepackage{docutils}[2025-08-06]
+\usepackage{docutils}[2025-12-10]
\ifdefined\DUchdimen % lengh unit "ch": width of a zero char
\else
Modified: trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2026-01-07 07:52:49 UTC (rev 10285)
@@ -33,7 +33,7 @@
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
-\usepackage{docutils}[2025-08-06]
+\usepackage{docutils}[2025-12-10]
\newcounter{enumv}
\DUprovidelength{\pdfpxdimen}{1bp}
Modified: trunk/docutils/test/functional/input/latex_cornercases.rst
===================================================================
--- trunk/docutils/test/functional/input/latex_cornercases.rst 2026-01-07 07:52:27 UTC (rev 10284)
+++ trunk/docutils/test/functional/input/latex_cornercases.rst 2026-01-07 07:52:49 UTC (rev 10285)
@@ -53,6 +53,36 @@
.. image:: ../../../docs/user/rst/images/title.png
:width: 100%
+
+Additional text roles
+=====================
+
+Including the "html-roles.txt" standard definition file adds
+roles matching semantic HTML inline markup elements.
+
+.. include:: <html-roles.txt>
+
+===== =============== ====================================
+Role Example Notes
+===== =============== ====================================
+del :del:`removed` removed content
+ins :ins:`inserted` editional additions
+b :b:`keyword` highlight :b:`key words`
+ without marking them up as important
+dfn :dfn:`dfn` the defining instance of a term
+i :i:`rôle` :i:`voix alternative`
+kbd :kbd:`Ctrl X` user input
+mark :mark:`up` highlight a :mark:`run of text`
+q :q:`Tagline!` content quoted from another source
+s :s:`strike` text that is inaccurate or
+ no longer relevant
+samp :samp:`Ready!` computer output
+small :small:`print` side comments
+u :u:`anotation` unarticulated annotations of, e.g,
+ :u:`comon mispellings`
+var :var:`n` variables (or constants)
+===== =============== ====================================
+
.. include:: data/tables_latex.rst
.. include:: data/nonalphanumeric.rst
.. include:: data/unicode.rst
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 07:52:31
|
Revision: 10284
http://sourceforge.net/p/docutils/code/10284
Author: milde
Date: 2026-01-07 07:52:27 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
LaTeX writer: don't write labels for implicit IDs that are not referenced.
With LaTeX-generated PDFs, there is no (easy) way to link to a fragment from
an external source. Therefore, we only need `\label` macros for IDs that actually
are either from an explicit target (or a directive with "name" option) or
referenced to from the current document (internal cross-links).
This drops most labels from section titles, making the TeX file less verbose
and faster to compile.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/test/functional/expected/cyrillic.tex
trunk/docutils/test/functional/expected/latex_cornercases.tex
trunk/docutils/test/functional/expected/latex_leavevmode.tex
trunk/docutils/test/functional/expected/latex_memoir.tex
trunk/docutils/test/functional/expected/length_units_latex.tex
trunk/docutils/test/functional/expected/length_units_xetex.tex
trunk/docutils/test/functional/expected/standalone_rst_latex.tex
trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
trunk/docutils/test/functional/expected/xetex-cyrillic.tex
trunk/docutils/test/test_writers/test_latex2e.py
trunk/docutils/test/test_writers/test_latex2e_parts.py
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:52:27 UTC (rev 10284)
@@ -139,10 +139,6 @@
* "latex2e" writer:
- - Only write ``\label`` commands for explicit IDs and IDs that are
- referenced in the current document (i.e. not for un-referenced
- section titles) in Docutils 0.23.
-
- Change default of use_latex_citations_ setting to True
in Docutils 1.0.
@@ -298,6 +294,11 @@
- The "include" directive options :start-after: and :end-before: may now
also be used without value (standing for an empty line).
+LaTeX writer:
+ - Only write ``\label`` commands for explicit IDs and IDs that are
+ referenced in the current document (i.e. not for un-referenced
+ section titles).
+
Removed objects
`parsers.rst.directives.tables.CSVTable.check_requirements()`
not required with Python 3
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2026-01-07 07:52:27 UTC (rev 10284)
@@ -1188,6 +1188,13 @@
self.warn = self.document.reporter.warning
self.error = self.document.reporter.error
+ # Set of IDs that are actually used in <reference>'s "refid" attribute
+ # (see `ids_to_labels()`):
+ self.refids = set()
+ for node in document.findall(nodes.reference):
+ if 'refid' in node:
+ self.refids.add(node['refid'])
+
# Settings
# ~~~~~~~~
settings = self.settings
@@ -1258,7 +1265,6 @@
# Output collection stacks
# ~~~~~~~~~~~~~~~~~~~~~~~~
-
# Document parts
self.head_prefix = [f'\\documentclass[{self.documentoptions}]'
f'{{{settings.documentclass}}}']
@@ -1562,8 +1568,11 @@
def ids_to_labels(self, node, set_anchor=True, protect=False,
newline=False, pre_nl=False) -> list[str]:
- """Return label definitions for all ids of `node`.
+ """Return label definitions for IDs of `node`.
+ Make labels for all IDs that are either explicit or referenced in
+ the document (i.e. not for section headings that are not referenced).
+
If `set_anchor` is True, an anchor is set with \\phantomsection.
If `protect` is True, the \\label cmd is made robust.
If `newline` is True, a newline is added if there are labels.
@@ -1571,8 +1580,12 @@
Provisional.
"""
+ explicit_IDs = set(self.document.nameids[name]
+ for name in node['names']
+ if self.document.nametypes[name])
prefix = '\\protect' if protect else ''
- labels = [f'{prefix}\\label{{{id}}}' for id in node['ids']]
+ labels = [f'{prefix}\\label{{{ID}}}' for ID in node['ids']
+ if ID in explicit_IDs.union(self.refids)]
if labels:
if set_anchor:
labels.insert(0, '\\phantomsection')
@@ -3254,15 +3267,12 @@
else:
self.out.append(r'\%s{' % section_name)
- # label and ToC entry:
- bookmark = ['']
- # add sections with unsupported level to toc and pdfbookmarks?
- ## if level > len(self.d_class.sections):
- ## section_title = self.encode(node.astext())
- ## bookmark.append(r'\addcontentsline{toc}{%s}{%s}' %
- ## (section_name, section_title))
- bookmark += self.ids_to_labels(node.parent, set_anchor=False)
- self.context.append('%\n '.join(bookmark) + '%\n}\n')
+ # label(s) and ToC entry:
+ labels = self.ids_to_labels(node.parent, set_anchor=False)
+ if labels:
+ self.context.append('%\n '.join(('', *labels)) + '%\n}\n')
+ else:
+ self.context.append('}\n')
if (level > len(self.d_class.sections)
and not self.settings.legacy_class_functions):
self.context[-1] += '\\end{DUclass}\n'
@@ -3298,8 +3308,7 @@
# labels and PDF bookmark (sidebar entry)
self.out.append('\n') # start new paragraph
- if len(node['names']) > 1: # don't add labels just for the auto-id
- self.out += self.ids_to_labels(node, newline=True)
+ self.out += self.ids_to_labels(node, newline=True)
if (isinstance(node.next_node(), nodes.title)
and 'local' not in node['classes']
and self.settings.documentclass != 'memoir'):
Modified: trunk/docutils/test/functional/expected/cyrillic.tex
===================================================================
--- trunk/docutils/test/functional/expected/cyrillic.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/cyrillic.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -32,23 +32,17 @@
\begin{document}
-\section{Заголовок%
- \label{section-1}%
-}
+\section{Заголовок}
первый пример: «Здравствуй, мир!»
-\section{Title%
- \label{title}%
-}
+\section{Title}
\foreignlanguage{english}{first example: “Hello world”.}
-\section{Примечания%
- \label{section-2}%
-}
+\section{Примечания}
Этот документ испытивает изображение LaTeXом кириллических букв.
Modified: trunk/docutils/test/functional/expected/latex_cornercases.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_cornercases.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/latex_cornercases.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -130,8 +130,7 @@
%%% Body
\begin{document}
-\title{Additional Tests for the LaTeX Writer%
- \label{additional-tests-for-the-latex-writer}}
+\title{Additional Tests for the LaTeX Writer}
\author{}
\date{}
\maketitle
@@ -143,50 +142,36 @@
\tableofcontents
-\section{Section heading levels%
- \label{section-heading-levels}%
-}
+\section{Section heading levels}
-\section{Level 1%
- \label{level-1}%
-}
+\section{Level 1}
Nested sections
-\subsection{Level 2%
- \label{level-2}%
-}
+\subsection{Level 2}
reach at some level
-\subsubsection{Level 3%
- \label{level-3}%
-}
+\subsubsection{Level 3}
(depending on the document class and output format)
-\paragraph{level 4%
- \label{level-4}%
-}
+\paragraph{level 4}
a level
-\subparagraph{level 5%
- \label{level-5}%
-}
+\subparagraph{level 5}
that is not supported by the output format.
\begin{DUclass}{sectionVI}
-\DUtitle{level 6%
- \label{level-6}%
-}
+\DUtitle{level 6}
\end{DUclass}
Unsupported in LaTeX and HTML5
@@ -194,9 +179,7 @@
\begin{DUclass}{sectionVII}
-\DUtitle{level 7%
- \label{level-7}%
-}
+\DUtitle{level 7}
\end{DUclass}
Unsupported in HTML4.
@@ -203,9 +186,7 @@
\begin{DUclass}{sectionVIII}
-\DUtitle{level 8%
- \label{level-8}%
-}
+\DUtitle{level 8}
\end{DUclass}
Unsupported in ODT.
@@ -212,14 +193,11 @@
\section{Section titles with inline markup%
- \label{section-titles-with-inline-markup}%
\label{references}%
}
-\subsection{\emph{emphasized}, H\textsubscript{2}O, $x^2$, and \hyperref[references]{references}%
- \label{emphasized-h2o-x-2-and-references}%
-}
+\subsection{\emph{emphasized}, H\textsubscript{2}O, $x^2$, and \hyperref[references]{references}}
\subsection{Substitutions work%
@@ -235,9 +213,7 @@
% This file is used by the standalone_rst_latex test.
-\section{Option lists%
- \label{option-lists}%
-}
+\section{Option lists}
The LaTeX-2e description environment is used for definition lists.
The definition is continued on the same line as the term, this should
@@ -262,9 +238,7 @@
\end{description}
-\section{Block Quotes%
- \label{block-quotes}%
-}
+\section{Block Quotes}
\begin{quote}
This block quote comes directly after the section heading and is
@@ -291,9 +265,7 @@
\end{quote}
-\section{More Block Quotes%
- \label{more-block-quotes}%
-}
+\section{More Block Quotes}
\begin{quote}
Block quote followed by a transition.
@@ -307,9 +279,7 @@
\end{quote}
-\section{Images%
- \label{images}%
-}
+\section{Images}
Image with 20\% width:
@@ -320,9 +290,7 @@
\includegraphics[width=1\linewidth]{../../../docs/user/rst/images/title.png}
-\section{Tables%
- \label{tables}%
-}
+\section{Tables}
In contrast to HTML, LaTeX does not support line-breaks in tables with
\textquotedbl{}automatic\textquotedbl{} column widths. Each cell has just one line, paragraphs are
@@ -610,9 +578,7 @@
\end{longtable}
-\subsection{Nested tables%
- \label{nested-tables}%
-}
+\subsection{Nested tables}
\setlength{\DUtablewidth}{\dimexpr\linewidth-3\arrayrulewidth\relax}%
\begin{longtable*}{|p{\DUcolumnwidth{0.700}}|p{\DUcolumnwidth{0.300}}|}
@@ -695,9 +661,7 @@
\end{longtable*}
-\subsection{TODO%
- \label{todo}%
-}
+\subsection{TODO}
\begin{itemize}
\item Tables with multi-paragraph multi-row cells currently fail due to a
@@ -709,9 +673,7 @@
See also \texttt{test/functional/input/data/latex-problematic.rst}.
-\section{Monospaced non-alphanumeric characters%
- \label{monospaced-non-alphanumeric-characters}%
-}
+\section{Monospaced non-alphanumeric characters}
These are all ASCII characters except a-zA-Z0-9 and space:
@@ -725,9 +687,7 @@
width as the third line.
-\section{Non-ASCII characters%
- \label{non-ascii-characters}%
-}
+\section{Non-ASCII characters}
\begin{longtable}{|l|l|}
\caption{Punctuation and footnote symbols}\\
@@ -812,9 +772,7 @@
\end{itemize}
-\section{Encoding special characters%
- \label{encoding-special-characters}%
-}
+\section{Encoding special characters}
The LaTeX Info pages list under \textquotedbl{}2.18 Special Characters\textquotedbl{}
@@ -869,9 +827,7 @@
(\texttt{< | >}).
-\section{Hyperlinks and -targets%
- \label{hyperlinks-and-targets}%
-}
+\section{Hyperlinks and -targets}
In LaTeX, we must set an explicit anchor (\texttt{\textbackslash{}phantomsection}) for a
%
@@ -915,9 +871,7 @@
\hyperref[image-label]{image label}.
-\section{External references%
- \label{external-references}%
-}
+\section{External references}
Long URLs should be wrapped in the PDF. This can be achieved with the
\texttt{\textbackslash{}url} command which is used by the LaTeX writer whenever the content
Modified: trunk/docutils/test/functional/expected/latex_leavevmode.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_leavevmode.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/latex_leavevmode.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -154,8 +154,7 @@
%%% Body
\begin{document}
-\title{Styling of Elements in Definition- or Field-List%
- \label{styling-of-elements-in-definition-or-field-list}}
+\title{Styling of Elements in Definition- or Field-List}
\author{}
\date{}
\maketitle
@@ -187,9 +186,7 @@
\end{DUclass}
-\section{Elements needing \texttt{\textbackslash{}leavevmode}%
- \label{elements-needing-leavevmode}%
-}
+\section{Elements needing \texttt{\textbackslash{}leavevmode}}
\begin{DUfieldlist}
\item[{Bullet List:}]\leavevmode
@@ -322,9 +319,7 @@
\end{description}
-\section{Elements not needing \texttt{\textbackslash{}leavevmode}%
- \label{elements-not-needing-leavevmode}%
-}
+\section{Elements not needing \texttt{\textbackslash{}leavevmode}}
\begin{description}
\item[{Paragraph}]
@@ -352,9 +347,7 @@
\end{description}
-\section{Ambiguous cases%
- \label{ambiguous-cases}%
-}
+\section{Ambiguous cases}
\begin{description}
\item[{Comment and Target}] \leavevmode
Modified: trunk/docutils/test/functional/expected/latex_memoir.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_memoir.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/latex_memoir.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -196,11 +196,9 @@
}
\title{reStructuredText Test Document%
- \protect\label{restructuredtext-test-document}%
\protect\label{doctitle}%
\\%
\DUdocumentsubtitle{Examples of Syntax Constructs}%
- \protect\label{examples-of-syntax-constructs}%
\protect\label{subtitle}}
\author{David Goodger\\
123 Example Street\\
@@ -271,13 +269,12 @@
\pagebreak[4] % start ToC on new page
+\phantomsection\label{table-of-contents}
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents
-\chapter{1 Structural Elements%
- \label{structural-elements}%
-}
+\chapter{1 Structural Elements}
\section{1.1 Section Title%
@@ -285,9 +282,7 @@
}
-\subsection{1.1.1 Section Subtitle%
- \label{section-subtitle}%
-}
+\subsection{1.1.1 Section Subtitle}
Lone subsections are converted to a section subtitle by a transform
activated with the \texttt{-{}-section-subtitles} command line option or the
@@ -294,14 +289,10 @@
\texttt{sectsubtitle-xform} configuration value.
-\section{1.2 Empty Section%
- \label{empty-section}%
-}
+\section{1.2 Empty Section}
-\section{1.3 Transitions%
- \label{transitions}%
-}
+\section{1.3 Transitions}
Here's a transition:
@@ -319,9 +310,7 @@
}
-\section{2.1 Paragraphs%
- \label{paragraphs}%
-}
+\section{2.1 Paragraphs}
A paragraph.
@@ -366,9 +355,7 @@
live link to PEP 258 here.
-\section{2.2 Bullet Lists%
- \label{bullet-lists}%
-}
+\section{2.2 Bullet Lists}
\begin{itemize}
\item A bullet list
@@ -404,9 +391,7 @@
\end{itemize}
-\section{2.3 Enumerated Lists%
- \label{enumerated-lists}%
-}
+\section{2.3 Enumerated Lists}
\begin{enumerate}
\item Arabic numerals.
@@ -457,9 +442,7 @@
\end{enumerate}
-\section{2.4 Definition Lists%
- \label{definition-lists}%
-}
+\section{2.4 Definition Lists}
\begin{description}
\item[{Term}]
@@ -478,9 +461,7 @@
\end{description}
-\section{2.5 Field Lists%
- \label{field-lists}%
-}
+\section{2.5 Field Lists}
\begin{DUfieldlist}
\item[{what:}]
@@ -501,9 +482,7 @@
\end{DUfieldlist}
-\section{2.6 Option Lists%
- \label{option-lists}%
-}
+\section{2.6 Option Lists}
For listing command-line options:
@@ -531,9 +510,7 @@
description.
-\section{2.7 Literal Blocks%
- \label{literal-blocks}%
-}
+\section{2.7 Literal Blocks}
Literal blocks are indicated with a double-colon (\textquotedbl{}::\textquotedbl{}) at the end of
the preceding paragraph (over there \texttt{-{}->}). They can be indented:
@@ -558,9 +535,7 @@
\end{quote}
-\section{2.8 Line Blocks%
- \label{line-blocks}%
-}
+\section{2.8 Line Blocks}
This section tests line blocks. Line blocks are body elements which
consist of lines and other line blocks. Nested line blocks cause
@@ -653,9 +628,7 @@
\end{selectlanguage}
-\section{2.9 Block Quotes%
- \label{block-quotes}%
-}
+\section{2.9 Block Quotes}
Block quotes consist of indented body elements:
@@ -683,9 +656,7 @@
\end{selectlanguage}
-\section{2.10 Doctest Blocks%
- \label{doctest-blocks}%
-}
+\section{2.10 Doctest Blocks}
\begin{quote}
\begin{alltt}
@@ -697,9 +668,7 @@
\end{quote}
-\section{2.11 Footnotes%
- \label{footnotes}%
-}
+\section{2.11 Footnotes}
%
\DUfootnotetext{footnote-1}{footnote-reference-1}{1}{%
A footnote contains body elements, consistently indented by at
@@ -740,9 +709,7 @@
}
-\section{2.12 Citations%
- \label{citations}%
-}
+\section{2.12 Citations}
\begin{figure}[b]\raisebox{1em}{\hypertarget{cit2002}{}}[CIT2002]
Citations are text-labeled footnotes. They may be
rendered separately and differently from footnotes.
@@ -777,9 +744,7 @@
error.
-\subsection{2.13.1 Duplicate Target Names%
- \label{duplicate-target-names}%
-}
+\subsection{2.13.1 Duplicate Target Names}
Duplicate names in section headers or other implicit targets will
generate \textquotedbl{}info\textquotedbl{} (level-1) system messages. Duplicate names in
@@ -786,9 +751,7 @@
explicit targets will generate \textquotedbl{}warning\textquotedbl{} (level-2) system messages.
-\subsection{2.13.2 Duplicate Target Names%
- \label{duplicate-target-names-1}%
-}
+\subsection{2.13.2 Duplicate Target Names}
Since there are two \textquotedbl{}Duplicate Target Names\textquotedbl{} section headers, we
cannot uniquely refer to either of them by name. If we try to (like
@@ -804,9 +767,7 @@
others, please see \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html}{reStructuredText Directives}\DUfootnotemark{footnote-reference-18}{footnote-10}{9}.
-\subsection{2.14.1 Document Parts%
- \label{document-parts}%
-}
+\subsection{2.14.1 Document Parts}
An example of the \textquotedbl{}contents\textquotedbl{} directive can be seen above this section
(a local, untitled table of \hyperref[contents]{contents}) and at the beginning of the
@@ -813,9 +774,7 @@
document (a document-wide \hyperref[table-of-contents]{table of contents}).
-\subsection{2.14.2 Images and Figures%
- \label{images-and-figures}%
-}
+\subsection{2.14.2 Images and Figures}
An image directive (also clickable -{}- a hyperlink reference):
@@ -956,9 +915,7 @@
upon the style sheet and the browser or rendering software used.
-\subsection{2.14.3 Tables%
- \label{tables}%
-}
+\subsection{2.14.3 Tables}
Tables may be given titles and additional arguments with the \emph{table}
directive:
@@ -1101,9 +1058,7 @@
\end{longtable*}
-\subsection{2.14.4 Admonitions%
- \label{admonitions}%
-}
+\subsection{2.14.4 Admonitions}
\DUadmonition[attention]{
\DUtitle[attention]{Attention!}
@@ -1175,9 +1130,7 @@
}
-\subsection{2.14.5 Topics, Sidebars, and Rubrics%
- \label{topics-sidebars-and-rubrics}%
-}
+\subsection{2.14.5 Topics, Sidebars, and Rubrics}
\emph{Sidebars} are like miniature, parallel documents.
@@ -1215,9 +1168,7 @@
allowed (e.g. inside a directive).
-\subsection{2.14.6 Target Footnotes%
- \label{target-footnotes}%
-}
+\subsection{2.14.6 Target Footnotes}
%
\DUfootnotetext{footnote-6}{footnote-reference-10}{5}{%
\url{http://www.python.org/}
@@ -1244,16 +1195,12 @@
}
-\subsection{2.14.7 Replacement Text%
- \label{replacement-text}%
-}
+\subsection{2.14.7 Replacement Text}
I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\DUfootnotemark{footnote-reference-12}{footnote-6}{5}.
-\subsection{2.14.8 Compound Paragraph%
- \label{compound-paragraph}%
-}
+\subsection{2.14.8 Compound Paragraph}
The \emph{compound} directive is used to create a \textquotedbl{}compound paragraph\textquotedbl{}, which
is a single logical paragraph containing multiple physical body
@@ -1386,9 +1333,7 @@
\end{DUclass}
-\subsection{2.14.9 Parsed Literal Blocks%
- \label{parsed-literal-blocks}%
-}
+\subsection{2.14.9 Parsed Literal Blocks}
\begin{quote}
\ttfamily\raggedright
@@ -1403,9 +1348,7 @@
\end{quote}
-\subsection{2.14.10 Code%
- \label{code}%
-}
+\subsection{2.14.10 Code}
Blocks of source code can be set with the \DUroletitlereference{code} directive. If the code
language is specified, the content is parsed and tagged by the \href{http://pygments.org/}{Pygments}\DUfootnotemark{footnote-reference-13}{footnote-7}{6}
@@ -1460,9 +1403,7 @@
\end{DUclass}
-\subsection{2.14.11 Meta%
- \label{meta}%
-}
+\subsection{2.14.11 Meta}
The \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata}{“meta” directive}\DUfootnotemark{footnote-reference-19}{footnote-11}{10} is used to specify metadata to be stored in,
e.g., HTML META tags or ODT file properties.
@@ -1479,9 +1420,7 @@
(Substitution definitions are only visible in the rST source.)
-\section{2.16 Comments%
- \label{comments}%
-}
+\section{2.16 Comments}
Here's one:
@@ -1496,9 +1435,7 @@
(View the HTML/LaTeX/... source to see the comment.)
-\section{2.17 Raw text%
- \label{raw-text}%
-}
+\section{2.17 Raw text}
This does not necessarily look nice, because there may be missing white space.
@@ -1515,9 +1452,7 @@
Fifth test in LaTeX.\\Line two.
-\section{2.18 Container%
- \label{container}%
-}
+\section{2.18 Container}
\begin{DUclass}{custom}
paragraph 1
@@ -1529,9 +1464,7 @@
% .. include:: data/header_footer.rst
-\section{2.19 Colspanning tables%
- \label{colspanning-tables}%
-}
+\section{2.19 Colspanning tables}
This table has a cell spanning two columns:
@@ -1607,9 +1540,7 @@
\end{longtable*}
-\section{2.20 Rowspanning tables%
- \label{rowspanning-tables}%
-}
+\section{2.20 Rowspanning tables}
Here's a table with cells spanning several rows:
@@ -1666,9 +1597,7 @@
\end{longtable*}
-\section{2.21 List Tables%
- \label{list-tables}%
-}
+\section{2.21 List Tables}
Here's a list table exercising all features:
@@ -1740,9 +1669,7 @@
\end{longtable}
-\section{2.22 Custom Roles%
- \label{custom-roles}%
-}
+\section{2.22 Custom Roles}
\begin{itemize}
\item A role based on an existing role.
@@ -1784,9 +1711,7 @@
\end{itemize}
-\section{2.23 Mathematics%
- \label{mathematics}%
-}
+\section{2.23 Mathematics}
Docutils supports inline math with the prefix or postfix \texttt{:math:}
role specificator, $n! + \sin(x_n^2)$ and $A_\text{c} =
@@ -1900,9 +1825,7 @@
\end{cases}
\end{equation*}
-\chapter{3 Tests for the LaTeX writer%
- \label{tests-for-the-latex-writer}%
-}
+\chapter{3 Tests for the LaTeX writer}
Test syntax elements which may cause trouble for the LaTeX writer but might
not need to be tested with other writers. See also the
@@ -1909,9 +1832,7 @@
\textquotedbl{}latex\_cornercases\textquotedbl{} test.
-\section{3.1 Custom Roles in LaTeX%
- \label{custom-roles-in-latex}%
-}
+\section{3.1 Custom Roles in LaTeX}
\begin{itemize}
\item Role names and class arguments are converted to conform to the
@@ -1952,9 +1873,7 @@
\end{itemize}
-\section{3.2 class handling%
- \label{class-handling}%
-}
+\section{3.2 class handling}
This section tests class handling for block level elements by the LaTeX
writer. See the input file \texttt{classes\_latex.rst} for the raw LaTeX code used
@@ -2055,9 +1974,7 @@
% preface for System Messages:
-\chapter{4 Error Handling%
- \label{error-handling}%
-}
+\chapter{4 Error Handling}
Any errors caught during processing will generate system messages.
@@ -2067,8 +1984,7 @@
% section should be added by Docutils automatically
-\chapter[Docutils System Messages]{\color{red}Docutils System Messages%
-}
+\chapter[Docutils System Messages]{\color{red}Docutils System Messages}
\raisebox{1em}{\hypertarget{system-message-1}{}}
\DUadmonition[system-message]{
Modified: trunk/docutils/test/functional/expected/length_units_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/length_units_latex.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/length_units_latex.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -46,16 +46,13 @@
%%% Body
\begin{document}
-\title{Test length specifications%
- \label{test-length-specifications}}
+\title{Test length specifications}
\author{}
\date{}
\maketitle
-\section{Images and Figures%
- \label{images-and-figures}%
-}
+\section{Images and Figures}
\begin{figure}
\noindent\makebox[\linewidth][c]{\includegraphics[scale=1]{../input/data/blue square.png}}
@@ -153,9 +150,7 @@
\end{figure}
-\section{ch, em, and rem: \includegraphics[height=1\DUchdimen]{../input/data/blue square.png} \includegraphics[height=1em]{../input/data/blue square.png} \includegraphics[height=1\DUremdimen]{../input/data/blue square.png}%
- \label{ch-em-and-rem-test1ch-test1em-test1rem}%
-}
+\section{ch, em, and rem: \includegraphics[height=1\DUchdimen]{../input/data/blue square.png} \includegraphics[height=1em]{../input/data/blue square.png} \includegraphics[height=1\DUremdimen]{../input/data/blue square.png}}
Image height 1ch, 1em, and 1rem: \includegraphics[height=1\DUchdimen]{../input/data/blue square.png} \includegraphics[height=1em]{../input/data/blue square.png} \includegraphics[height=1\DUremdimen]{../input/data/blue square.png}
@@ -163,9 +158,7 @@
The unit \textquotedbl{}rem\textquotedbl{} is tied to the document root fontsize.
-\section{Tables%
- \label{tables}%
-}
+\section{Tables}
\setlength{\DUtablewidth}{\dimexpr\linewidth-3\arrayrulewidth\relax}%
\begin{longtable*}{|p{\DUcolumnwidth{0.500}}|p{\DUcolumnwidth{0.500}}|}
Modified: trunk/docutils/test/functional/expected/length_units_xetex.tex
===================================================================
--- trunk/docutils/test/functional/expected/length_units_xetex.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/length_units_xetex.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -74,8 +74,7 @@
pdftitle={Test length specifications},
}
-\title{Test length specifications%
- \label{test-length-specifications}}
+\title{Test length specifications}
\author{}
\date{}
@@ -84,9 +83,7 @@
\maketitle
-\section{Images and Figures%
- \label{images-and-figures}%
-}
+\section{Images and Figures}
\begin{figure}
\noindent\makebox[\linewidth][c]{\includegraphics[scale=1]{../input/data/blue square.png}}
@@ -184,9 +181,7 @@
\end{figure}
-\section{ch, em, and rem: \includegraphics[height=1\DUchdimen]{../input/data/blue square.png} \includegraphics[height=1em]{../input/data/blue square.png} \includegraphics[height=1\DUremdimen]{../input/data/blue square.png}%
- \label{ch-em-and-rem-test1ch-test1em-test1rem}%
-}
+\section{ch, em, and rem: \includegraphics[height=1\DUchdimen]{../input/data/blue square.png} \includegraphics[height=1em]{../input/data/blue square.png} \includegraphics[height=1\DUremdimen]{../input/data/blue square.png}}
Image height 1ch, 1em, and 1rem: \includegraphics[height=1\DUchdimen]{../input/data/blue square.png} \includegraphics[height=1em]{../input/data/blue square.png} \includegraphics[height=1\DUremdimen]{../input/data/blue square.png}
@@ -194,9 +189,7 @@
The unit \textquotedbl{}rem\textquotedbl{} is tied to the document root fontsize.
-\section{Tables%
- \label{tables}%
-}
+\section{Tables}
\setlength{\DUtablewidth}{\dimexpr\linewidth-3\arrayrulewidth\relax}%
\begin{longtable*}{|p{\DUcolumnwidth{0.500}}|p{\DUcolumnwidth{0.500}}|}
Modified: trunk/docutils/test/functional/expected/standalone_rst_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -197,11 +197,9 @@
%%% Body
\begin{document}
\title{reStructuredText Test Document%
- \label{restructuredtext-test-document}%
\label{doctitle}%
\\%
\DUdocumentsubtitle{Examples of Syntax Constructs}%
- \label{examples-of-syntax-constructs}%
\label{subtitle}}
\author{}
\date{}
@@ -268,14 +266,13 @@
\pagebreak[4] % start ToC on new page
+\phantomsection\label{table-of-contents}
\pdfbookmark[1]{Table of Contents}{table-of-contents}
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents
-\section{1 Structural Elements%
- \label{structural-elements}%
-}
+\section{1 Structural Elements}
\subsection{1.1 Section Title%
@@ -288,14 +285,10 @@
\texttt{sectsubtitle-xform} configuration value.
-\subsection{1.2 Empty Section%
- \label{empty-section}%
-}
+\subsection{1.2 Empty Section}
-\subsection{1.3 Transitions%
- \label{transitions}%
-}
+\subsection{1.3 Transitions}
Here’s a transition:
@@ -313,9 +306,7 @@
}
-\subsection{2.1 Paragraphs%
- \label{paragraphs}%
-}
+\subsection{2.1 Paragraphs}
A paragraph.
@@ -360,9 +351,7 @@
live link to PEP 258 here.
-\subsection{2.2 Bullet Lists%
- \label{bullet-lists}%
-}
+\subsection{2.2 Bullet Lists}
\begin{itemize}
\item A bullet list
@@ -398,9 +387,7 @@
\end{itemize}
-\subsection{2.3 Enumerated Lists%
- \label{enumerated-lists}%
-}
+\subsection{2.3 Enumerated Lists}
\begin{enumerate}
\item Arabic numerals.
@@ -451,9 +438,7 @@
\end{enumerate}
-\subsection{2.4 Definition Lists%
- \label{definition-lists}%
-}
+\subsection{2.4 Definition Lists}
\begin{description}
\item[{Term}]
@@ -472,9 +457,7 @@
\end{description}
-\subsection{2.5 Field Lists%
- \label{field-lists}%
-}
+\subsection{2.5 Field Lists}
\begin{DUfieldlist}
\item[{what:}]
@@ -495,9 +478,7 @@
\end{DUfieldlist}
-\subsection{2.6 Option Lists%
- \label{option-lists}%
-}
+\subsection{2.6 Option Lists}
For listing command-line options:
@@ -525,9 +506,7 @@
description.
-\subsection{2.7 Literal Blocks%
- \label{literal-blocks}%
-}
+\subsection{2.7 Literal Blocks}
Literal blocks are indicated with a double-colon (“::”) at the end of
the preceding paragraph (over there \texttt{-{}->}). They can be indented:
@@ -552,9 +531,7 @@
\end{quote}
-\subsection{2.8 Line Blocks%
- \label{line-blocks}%
-}
+\subsection{2.8 Line Blocks}
This section tests line blocks. Line blocks are body elements which
consist of lines and other line blocks. Nested line blocks cause
@@ -647,9 +624,7 @@
\end{selectlanguage}
-\subsection{2.9 Block Quotes%
- \label{block-quotes}%
-}
+\subsection{2.9 Block Quotes}
Block quotes consist of indented body elements:
@@ -677,9 +652,7 @@
\end{selectlanguage}
-\subsection{2.10 Doctest Blocks%
- \label{doctest-blocks}%
-}
+\subsection{2.10 Doctest Blocks}
\begin{quote}
\begin{alltt}
@@ -691,9 +664,7 @@
\end{quote}
-\subsection{2.11 Footnotes%
- \label{footnotes}%
-}
+\subsection{2.11 Footnotes}
%
\DUfootnotetext{footnote-1}{footnote-reference-1}{1}{%
A footnote contains body elements, consistently indented by at
@@ -734,9 +705,7 @@
}
-\subsection{2.12 Citations%
- \label{citations}%
-}
+\subsection{2.12 Citations}
\begin{figure}[b]\raisebox{1em}{\hypertarget{cit2002}{}}[CIT2002]
Citations are text-labeled footnotes. They may be
rendered separately and differently from footnotes.
@@ -771,9 +740,7 @@
error.
-\subsubsection{2.13.1 Duplicate Target Names%
- \label{duplicate-target-names}%
-}
+\subsubsection{2.13.1 Duplicate Target Names}
Duplicate names in section headers or other implicit targets will
generate “info” (level-1) system messages. Duplicate names in
@@ -780,9 +747,7 @@
explicit targets will generate “warning” (level-2) system messages.
-\subsubsection{2.13.2 Duplicate Target Names%
- \label{duplicate-target-names-1}%
-}
+\subsubsection{2.13.2 Duplicate Target Names}
Since there are two “Duplicate Target Names” section headers, we
cannot uniquely refer to either of them by name. If we try to (like
@@ -798,9 +763,7 @@
others, please see \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html}{reStructuredText Directives}\DUfootnotemark{footnote-reference-18}{footnote-10}{9}.
-\subsubsection{2.14.1 Document Parts%
- \label{document-parts}%
-}
+\subsubsection{2.14.1 Document Parts}
An example of the “contents” directive can be seen above this section
(a local, untitled table of \hyperref[contents]{contents}) and at the beginning of the
@@ -807,9 +770,7 @@
document (a document-wide \hyperref[table-of-contents]{table of contents}).
-\subsubsection{2.14.2 Images and Figures%
- \label{images-and-figures}%
-}
+\subsubsection{2.14.2 Images and Figures}
An image directive (also clickable – a hyperlink reference):
@@ -950,9 +911,7 @@
upon the style sheet and the browser or rendering software used.
-\subsubsection{2.14.3 Tables%
- \label{tables}%
-}
+\subsubsection{2.14.3 Tables}
Tables may be given titles and additional arguments with the \emph{table}
directive:
@@ -1095,9 +1054,7 @@
\end{longtable*}
-\subsubsection{2.14.4 Admonitions%
- \label{admonitions}%
-}
+\subsubsection{2.14.4 Admonitions}
\begin{DUclass}{attention}
\begin{DUadmonition}
@@ -1189,9 +1146,7 @@
\end{DUclass}
-\subsubsection{2.14.5 Topics, Sidebars, and Rubrics%
- \label{topics-sidebars-and-rubrics}%
-}
+\subsubsection{2.14.5 Topics, Sidebars, and Rubrics}
\emph{Sidebars} are like miniature, parallel documents.
@@ -1229,9 +1184,7 @@
allowed (e.g. inside a directive).
-\subsubsection{2.14.6 Target Footnotes%
- \label{target-footnotes}%
-}
+\subsubsection{2.14.6 Target Footnotes}
%
\DUfootnotetext{footnote-6}{footnote-reference-10}{5}{%
\url{http://www.python.org/}
@@ -1258,16 +1211,12 @@
}
-\subsubsection{2.14.7 Replacement Text%
- \label{replacement-text}%
-}
+\subsubsection{2.14.7 Replacement Text}
I recommend you try \href{http://www.python.org/}{Python, \emph{the} best language around}\DUfootnotemark{footnote-reference-12}{footnote-6}{5}.
-\subsubsection{2.14.8 Compound Paragraph%
- \label{compound-paragraph}%
-}
+\subsubsection{2.14.8 Compound Paragraph}
The \emph{compound} directive is used to create a “compound paragraph”, which
is a single logical paragraph containing multiple physical body
@@ -1401,9 +1350,7 @@
\end{DUclass}
-\subsubsection{2.14.9 Parsed Literal Blocks%
- \label{parsed-literal-blocks}%
-}
+\subsubsection{2.14.9 Parsed Literal Blocks}
\begin{quote}
\ttfamily\raggedright
@@ -1418,9 +1365,7 @@
\end{quote}
-\subsubsection{2.14.10 Code%
- \label{code}%
-}
+\subsubsection{2.14.10 Code}
Blocks of source code can be set with the \DUroletitlereference{code} directive. If the code
language is specified, the content is parsed and tagged by the \href{http://pygments.org/}{Pygments}\DUfootnotemark{footnote-reference-13}{footnote-7}{6}
@@ -1475,9 +1420,7 @@
\end{DUclass}
-\subsubsection{2.14.11 Meta%
- \label{meta}%
-}
+\subsubsection{2.14.11 Meta}
The \href{https://docutils.sourceforge.io/docs/ref/rst/directives.html\#metadata}{“meta” directive}\DUfootnotemark{footnote-reference-19}{footnote-11}{10} is used to specify metadata to be stored in,
e.g., HTML META tags or ODT file properties.
@@ -1494,9 +1437,7 @@
(Substitution definitions are only visible in the rST source.)
-\subsection{2.16 Comments%
- \label{comments}%
-}
+\subsection{2.16 Comments}
Here’s one:
@@ -1511,9 +1452,7 @@
(View the HTML/LaTeX/… source to see the comment.)
-\subsection{2.17 Raw text%
- \label{raw-text}%
-}
+\subsection{2.17 Raw text}
This does not necessarily look nice, because there may be missing white space.
@@ -1530,9 +1469,7 @@
Fifth test in LaTeX.\\Line two.
-\subsection{2.18 Container%
- \label{container}%
-}
+\subsection{2.18 Container}
\begin{DUclass}{custom}
paragraph 1
@@ -1544,9 +1481,7 @@
% .. include:: data/header_footer.rst
-\subsection{2.19 Colspanning tables%
- \label{colspanning-tables}%
-}
+\subsection{2.19 Colspanning tables}
This table has a cell spanning two columns:
@@ -1622,9 +1557,7 @@
\end{longtable*}
-\subsection{2.20 Rowspanning tables%
- \label{rowspanning-tables}%
-}
+\subsection{2.20 Rowspanning tables}
Here’s a table with cells spanning several rows:
@@ -1681,9 +1614,7 @@
\end{longtable*}
-\subsection{2.21 List Tables%
- \label{list-tables}%
-}
+\subsection{2.21 List Tables}
Here’s a list table exercising all features:
@@ -1755,9 +1686,7 @@
\end{longtable}
-\subsection{2.22 Custom Roles%
- \label{custom-roles}%
-}
+\subsection{2.22 Custom Roles}
\begin{itemize}
\item A role based on an existing role.
@@ -1799,9 +1728,7 @@
\end{itemize}
-\subsection{2.23 Mathematics%
- \label{mathematics}%
-}
+\subsection{2.23 Mathematics}
Docutils supports inline math with the prefix or postfix \texttt{:math:}
role specificator, $n! + \sin(x_n^2)$ and $A_\text{c} =
@@ -1915,9 +1842,7 @@
\end{cases}
\end{equation*}
-\section{3 Tests for the LaTeX writer%
- \label{tests-for-the-latex-writer}%
-}
+\section{3 Tests for the LaTeX writer}
Test syntax elements which may cause trouble for the LaTeX writer but might
not need to be tested with other writers. See also the
@@ -1924,9 +1849,7 @@
“latex\_cornercases” test.
-\subsection{3.1 Custom Roles in LaTeX%
- \label{custom-roles-in-latex}%
-}
+\subsection{3.1 Custom Roles in LaTeX}
\begin{itemize}
\item Role names and class arguments are converted to conform to the
@@ -1967,9 +1890,7 @@
\end{itemize}
-\subsection{3.2 class handling%
- \label{class-handling}%
-}
+\subsection{3.2 class handling}
This section tests class handling for block level elements by the LaTeX
writer. See the input file \texttt{classes\_latex.rst} for the raw LaTeX code used
@@ -2070,9 +1991,7 @@
% preface for System Messages:
-\section{4 Error Handling%
- \label{error-handling}%
-}
+\section{4 Error Handling}
Any errors caught during processing will generate system messages.
@@ -2082,8 +2001,7 @@
% section should be added by Docutils automatically
-\section[Docutils System Messages]{\color{red}Docutils System Messages%
-}
+\section[Docutils System Messages]{\color{red}Docutils System Messages}
\raisebox{1em}{\hypertarget{system-message-1}{}}
\begin{DUclass}{system-message}
Modified: trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -61,11 +61,9 @@
}
\title{reStructuredText Test Document%
- \label{restructuredtext-test-document}%
\label{doctitle}%
\\%
\DUdocumentsubtitle{Examples of Syntax Constructs}%
- \label{examples-of-syntax-constructs}%
\label{subtitle}}
\author{}
\date{}
@@ -135,6 +133,7 @@
\pagebreak[4] % start ToC on new page
+\phantomsection\label{table-of-contents}
\pdfbookmark[1]{Table of Contents}{table-of-contents}
\begin{DUclass}{contents}
@@ -786,6 +785,7 @@
\label{directives}%
}
+\phantomsection\label{contents}
\begin{DUclass}{contents}
\begin{DUclass}{local}
@@ -2127,8 +2127,7 @@
% section should be added by Docutils automatically
-\section[Docutils System Messages]{\color{red}Docutils System Messages%
-}
+\section[Docutils System Messages]{\color{red}Docutils System Messages}
\raisebox{1em}{\hypertarget{system-message-1}{}}
\begin{DUclass}{system-message}
Modified: trunk/docutils/test/functional/expected/xetex-cyrillic.tex
===================================================================
--- trunk/docutils/test/functional/expected/xetex-cyrillic.tex 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/functional/expected/xetex-cyrillic.tex 2026-01-07 07:52:27 UTC (rev 10284)
@@ -39,23 +39,17 @@
\begin{document}
-\section{Заголовок%
- \label{section-1}%
-}
+\section{Заголовок}
первый пример: «Здравствуй, мир!»
-\section{Title%
- \label{title}%
-}
+\section{Title}
\foreignlanguage{english}{first example: “Hello world”.}
-\section{Примечания%
- \label{section-2}%
-}
+\section{Примечания}
Этот документ испытивает изображение LaTeXом кириллических букв.
Modified: trunk/docutils/test/test_writers/test_latex2e.py
===================================================================
--- trunk/docutils/test/test_writers/test_latex2e.py 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/test_writers/test_latex2e.py 2026-01-07 07:52:27 UTC (rev 10284)
@@ -129,34 +129,46 @@
Foo (some raw text)
same paragraph.
"""],
-# images and figures
-["""
-.. image:: larch-mini.jpg
- :target: larch.jpg
- :name: the-larch
- :class: currently ignored
- :align: center
-""",
-r"""
-\phantomsection\label{the-larch}
-\noindent\makebox[\linewidth][c]{\href{larch.jpg}{\includegraphics{larch-mini.jpg}}}
-"""],
+# figures and images
["""\
-.. _fig:larch:
+.. figure:: parrot.png
+ :figclass: figureclass
+ :figname: fig-ure
-.. figure:: larch-mini.jpg
- :target: larch.jpg
- :name: the-larch
+ .. class:: f-caption-class
+ .. _f-caption:
- The larch
+ A figure with caption
+
+ .. class:: legend-class
+ .. _le-gend:
+
+ A figure legend
+
+.. image:: parrot.png
+ :class: imgclass TODO ignored!
+ :name: i-mage
+ :target: example.org/parrots
+
+See i-mage_ and fig-ure_ with f-caption_ and le-gend_.
""",
r"""
-\phantomsection\label{fig-larch}
+\phantomsection\label{fig-ure}
+\begin{DUclass}{figureclass}
\begin{figure}
-\phantomsection\label{the-larch}
-\noindent\makebox[\linewidth][c]{\href{larch.jpg}{\includegraphics{larch-mini.jpg}}}
-\caption{The larch}
+\noindent\makebox[\linewidth][c]{\includegraphics{parrot.png}}
+\caption{\label{f-caption}\DUrole{f-caption-class}{A figure with caption}}
+\begin{DUlegend}
+\phantomsection\label{le-gend}
+\DUrole{legend-class}{A figure legend}
+\end{DUlegend}
\end{figure}
+\end{DUclass}
+
+\phantomsection\label{i-mage}
+\href{example.org/parrots}{\includegraphics{parrot.png}}
+
+See \hyperref[i-mage]{i-mage} and \hyperref[fig-ure]{fig-ure} with \hyperref[f-caption]{f-caption} and \hyperref[le-gend]{le-gend}.
"""],
# tables
# ======
@@ -328,7 +340,7 @@
.. class:: custom paragraph
-Next paragraph.
+Links to `block target`_ and `inline target`_.
""",
r"""
A paragraph with %
@@ -335,43 +347,21 @@
\phantomsection\label{inline-target}inline target.
\phantomsection\label{block-target}
-\DUrole{custom}{\DUrole{paragraph}{Next paragraph.}}
+\DUrole{custom}{\DUrole{paragraph}{Links to \hyperref[block-target]{block target} and \hyperref[inline-target]{inline target}.}}
"""],
-# admonition
+# block-quote
["""
.. class:: cls1
.. _label1:
-.. hint::
- :name: label2
- :class: cls2
- Don't forget to breathe.
-""",
-r"""
-\phantomsection\label{label2}\label{label1}
-\begin{DUclass}{cls2}
-\begin{DUclass}{cls1}
-\begin{DUclass}{hint}
-\begin{DUadmonition}
-\DUtitle{Hint}
-
-Don't forget to breathe.
-\end{DUadmonition}
-\end{DUclass}
-\end{DUclass}
-\end{DUclass}
-"""],
-# block quote
-["""
-.. class:: cls1
-.. _label1:
-
Exlicit is better than implicit.
.. class:: attribute-cls cute
- .. _a-tribution:
+ .. _an attribution:
-- Zen of Python
+
+See quote label1_ with `an attribution`_.
""",
r"""
\phantomsection\label{label1}
@@ -380,7 +370,7 @@
Exlicit is better than implicit.
\nopagebreak
-\phantomsection\label{a-tribution}
+\phantomsection\label{an-attribution}
\begin{DUclass}{attribute-cls}
\begin{DUclass}{cute}
\raggedleft —Zen of Python
@@ -388,8 +378,10 @@
\end{DUclass}
\end{quote}
\end{DUclass}
+
+See quote \hyperref[label1]{label1} with \hyperref[an-attribution]{an attribution}.
"""],
-# bullet list
+# lists
["""
.. class:: cls1
.. _bullet1:
@@ -400,20 +392,7 @@
.. _b-item:
* second bullet list item
-""",
-r"""
-\phantomsection\label{bullet1}
-\begin{DUclass}{cls1}
-\begin{itemize}
-\item list item
-\phantomsection\label{b-item}
-\item second bullet list item
-\end{itemize}
-\end{DUclass}
-"""],
-# definition list
-["""
.. class:: def-list-class
.. _def-list:
@@ -425,22 +404,7 @@
term
definition
-""",
-"""
-\\phantomsection\\label{def-list}
-\\begin{DUclass}{def-list-class}
-\\begin{description}
-\\item[{definition}] \n\
-list
-\\phantomsection\\label{def-item}
-\\item[{term}] \n\
-definition
-\\end{description}
-\\end{DUclass}
-"""],
-# enumerated list
-["""
.. class:: cls1
.. _enumerated1:
@@ -450,22 +414,7 @@
.. _e-item:
#. enumerated list item
-""",
-r"""
-\phantomsection\label{enumerated1}
-\begin{DUclass}{cls1}
-\begin{enumerate}
-\item list item
-\phantomsection\label{e-item}
-\item enumerated list item
-\end{enumerate}
-\end{DUclass}
-"""],
-# field list
-["""\
-Not a docinfo.
-
.. class:: fieldlist-class
.. _f-list:
@@ -475,23 +424,84 @@
.. _f-list-item:
:name: body
+
+.. class:: o-list-class
+.. _o-list:
+
+--an option list
+
+ .. class:: option-class
+ .. _o-item:
+
+--another option
+
+See bullet1_, b-item_,
+def-list_, def-item_,
+enumerated1_, e-item_,
+f-list_, f-list-item_,
+o-list_, and o-item_.
""",
-r"""
-Not a docinfo.
+"""
+\\phantomsection\\label{bullet1}
+\\begin{DUclass}{cls1}
+\\begin{itemize}
+\\item list item
-\phantomsection\label{f-list}
-\begin{DUclass}{fieldlist-class}
-\begin{DUfieldlist}
-\item[{field:}]
+\\phantomsection\\label{b-item}
+\\item second bullet list item
+\\end{itemize}
+\\end{DUclass}
+
+\\phantomsection\\label{def-list}
+\\begin{DUclass}{def-list-class}
+\\begin{description}
+\\item[{definition}] \n\
list
-\phantomsection\label{f-list-item}
-\item[{name:}]
+\\phantomsection\\label{def-item}
+\\item[{term}] \n\
+definition
+\\end{description}
+\\end{DUclass}
+
+\\phantomsection\\label{enumerated1}
+\\begin{DUclass}{cls1}
+\\begin{enumerate}
+\\item list item
+
+\\phantomsection\\label{e-item}
+\\item enumerated list item
+\\end{enumerate}
+\\end{DUclass}
+
+\\phantomsection\\label{f-list}
+\\begin{DUclass}{fieldlist-class}
+\\begin{DUfieldlist}
+\\item[{field:}]
+list
+
+\\phantomsection\\label{f-list-item}
+\\item[{name:}]
body
-\end{DUfieldlist}
-\end{DUclass}
+\\end{DUfieldlist}
+\\end{DUclass}
+
+\\phantomsection\\label{o-list}
+\\begin{DUclass}{o-list-class}
+\\begin{DUoptionlist}
+\\item[-{}-an] option list
+\\phantomsection\\label{o-item}
+\\item[-{}-another] option
+\\end{DUoptionlist}
+\\end{DUclass}
+
+See \\hyperref[bullet1]{bullet1}, \\hyperref[b-item]{b-item},
+\\hyperref[def-list]{def-list}, \\hyperref[def-item]{def-item},
+\\hyperref[enumerated1]{enumerated1}, \\hyperref[e-item]{e-item},
+\\hyperref[f-list]{f-list}, \\hyperref[f-list-item]{f-list-item},
+\\hyperref[o-list]{o-list}, and \\hyperref[o-item]{o-item}.
"""],
-# line block
+# line block and literal block
["""\
.. class:: lineblock-class
.. _line-block:
@@ -498,6 +508,15 @@
| line block
| second line
+
+.. class:: cls1
+.. _block1:
+
+::
+
+ 1^2_3
+
+See line-block_ and block1_.
""",
r"""
\phantomsection\label{line-block}
@@ -507,17 +526,7 @@
\item[] second line
\end{DUlineblock}
\end{DUclass}
-"""],
-# literal block
-["""\
-.. class:: cls1
-.. _block1:
-::
-
- 1^2_3
-""",
-r"""
\phantomsection\label{block1}
\begin{DUclass}{cls1}
\begin{quote}
@@ -526,28 +535,8 @@
\end{alltt}
\end{quote}
\end{DUclass}
-"""],
-# option list
-["""\
-.. class:: o-list-class
-.. _o-list:
---an option list
-
- .. class:: option-class
- .. _o-item:
-
---another option
-""",
-r"""
-\phantomsection\label{o-list}
-\begin{DUclass}{o-list-class}
-\begin{DUoptionlist}
-\item[-{}-an] option list
-\phantomsection\label{o-item}
-\item[-{}-another] option
-\end{DUoptionlist}
-\end{DUclass}
+See \hyperref[line-block]{line-block} and \hyperref[block1]{block1}.
"""],
# table with IDs and custom + special class values
["""\
@@ -561,6 +550,8 @@
= =
Y N
= =
+
+Refer to the table with either label1_ or label2_.
""",
r"""
\phantomsection\label{label2}\label{label1}
@@ -571,6 +562,8 @@
\end{longtable*}
\end{DUclass}
\end{DUclass}
+
+Refer to the table with either \hyperref[label1]{label1} or \hyperref[label2]{label2}.
"""],
# directives
["""\
@@ -588,70 +581,19 @@
Container paragraph 1
Container paragraph 2
-""",
-r"""
-\phantomsection\label{com-pound}
-\begin{DUclass}{compound}
-\begin{DUclass}{compoundclass}
-Compound paragraph 1
-Compound paragraph 2
-\end{DUclass}
-\end{DUclass}
+.. class:: cls1
+.. _label1:
+.. hint::
+ :name: label2
+ :class: cls2
-\phantomsection\label{con-tainer}
-\begin{DUclass}{containerclass}
-Container paragraph 1
+ Don't forget to breathe.
-Container paragraph 2
-\end{DUclass}
-"""],
-# figures and images
-["""\
-.. figure:: parrot.png
- :figclass: figureclass
- :figname: fig-ure
-
- .. class:: f-caption-class
- .. _f-caption:
-
- A figure with caption
-
- .. class:: legend-class
- .. _le-gend:
-
- A figure legend
-
-.. image:: parrot.png
- :class: imgclass TODO ignored!
- :name: i-mage
- :target: example.org/parrots
-""",
-r"""
-\phantomsection\label{fig-ure}
-\begin{DUclass}{figureclass}
-\begin{figure}
-\noindent\makebox[\linewidth][c]{\includegraphics{parrot.png}}
-\caption{\label{f-caption}\DUrole{f-caption-class}{A figure with caption}}
-\begin{DUlegend}
-\phantomsection\label{le-gend}
-\DUrole{legend-class}{A figure legend}
-\end{DUlegend}
-\end{figure}
-\end{DUclass}
-
-\phantomsection\label{i-mage}
-\href{example.org/parrots}{\includegraphics{parrot.png}}
-"""],
-["""\
.. math:: x = 2^4
:class: mathclass
:name: math-block
-.. note:: a specific admonition
- :class: noteclass
- :name: my-note
-
.. _my-raw:
.. raw:: latex pseudoxml xml
:class: rawclass
@@ -669,8 +611,42 @@
:name: to-pic
topic content
+
+See hint with label1_ and label2_,
+com-pound_, con-tainer_,
+math-block_, my-raw_,
+side-bar_, and to-pic_.
""",
-r"""%
+r"""
+\phantomsection\label{com-pound}
+\begin{DUclass}{compound}
+\begin{DUclass}{compoundclass}
+Compound paragraph 1
+
+Compound paragraph 2
+\end{DUclass}
+\end{DUclass}
+
+\phantomsection\label{con-tainer}
+\begin{DUclass}{containerclass}
+Container paragraph 1
+
+Container paragraph 2
+\end{DUclass}
+
+\phantomsection\label{label2}\label{label1}
+\begin{DUclass}{cls2}
+\begin{DUclass}{cls1}
+\begin{DUclass}{hint}
+\begin{DUadmonition}
+\DUtitle{Hint}
+
+Don't forget to breathe.
+\end{DUadmonition}
+\end{DUclass}
+\end{DUclass}
+\end{DUclass}
+%
\phantomsection
\DUrole{mathclass}{%
\begin{equation*}
@@ -678,17 +654,6 @@
\label{math-block}
\end{equation*}
}
-\phantomsection\label{my-note}
-\begin{DUclass}{noteclass}
-\begin{DUclass}{note}
-\begin{DUadmonition}
-\DUtitle{Note}
-
-a specific admonition
-\end{DUadmonition}
-\end{DUclass}
-\end{DUclass}
-
\phantomsection\label{my-raw}\DUrole{rawclass}{\LaTeX}
\phantomsection\label{side-bar}
@@ -710,6 +675,11 @@
\end{quote}
\end{DUclass}
\end{DUclass}
+
+See hint with \hyperref[label1]{label1} and \hyperref[label2]{label2},
+\hyperref[com-pound]{com-pound}, \hyperref[con-tainer]{con-tainer},
+\hyperref[math-block]{math-block}, \hyperref[my-raw]{my-raw},
+\hyperref[side-bar]{side-bar}, and \hyperref[to-pic]{to-pic}.
"""],
])
@@ -726,9 +696,7 @@
some text
-\section{first section%
- \label{first-section}%
-}
+\section{first section}
"""],
])
Modified: trunk/docutils/test/test_writers/test_latex2e_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_latex2e_parts.py 2026-01-07 07:52:09 UTC (rev 10283)
+++ trunk/docutils/test/test_writers/test_latex2e_parts.py 2026-01-07 07:52:27 UTC (rev 10284)
@@ -218,9 +218,7 @@
\tableofcontents
-\section{unnumbered section%
- \label{unnumbered-section}%
-}
+\section{unnumbered section}
""",
'requirements': '\\usepackage[T1]{fontenc}\n'
'\\setcounter{secnumdepth}{0}\n',
@@ -238,9 +236,7 @@
\tableofcontents
-\section{1 first section%
- \label{first-section}%
-}
+\section{1 first section}
""",
'requirements': '\\usepackage[T1]{fontenc}\n'
'\\setcounter{secnumdepth}{0}\n',
@@ -259,9 +255,7 @@
\tableofcontents
-\section{first section%
- \label{first-section}%
-}
+\section{first section}
""",
'requirements': '\\usepackage[T1]{fontenc}\n'
'\\setcounter{secnumdepth}{0}\n',
@@ -279,17 +273,13 @@
""",
{'body': r"""
-\section{section with local ToC%
- \label{section-with-local-toc}%
-}
+\section{section with local ToC}
\mtcsettitle{secttoc}{}
\secttoc
-\section{section not in local toc%
- \label{section-not-in-local-toc}%
-}
+\section{section not in local toc}
\faketableofcontents % for local ToCs
""",
@@ -432,9 +422,7 @@
""",
{'body': r"""
-\section{This is a \emph{section title}%
- \label{this-is-a-section-title}%
-}
+\section{This is a \emph{section title}}
This is the \emph{document}.
""",
@@ -452,10 +440,8 @@
'subtitle': 'This is the \\emph{Subtitle}',
'title': 'This is the \\emph{Title}',
'titledata': r"""\title{This is the \emph{Title}%
- \label{this-is-the-title}%
\\%
- \DUdocumentsubtitle{This is the \emph{Subtitle}}%
- \label{this-is-the-subtitle}}
+ \DUdocumentsubtitle{This is the \emph{Subtitle}}}
\author{}
\date{}
"""
@@ -489,11 +475,9 @@
'subtitle': 'for test purposes',
'title': 'The Document Title',
'titledata': r"""\title{The Document Title%
- \label{the-document-title}%
\label{top}%
\\%
\DUdocumentsubtitle{for test purposes}%
- \label{for-test-purposes}%
\label{what-for}}
\author{}
\date{}
@@ -597,9 +581,7 @@
\tableofcontents
-\chapter{first chapter%
- \label{first-chapter}%
-}
+\chapter{first chapter}
""",
'head_prefix': '\\documentclass[a4paper]{book}\n',
'requirements': '\\usepackage[T1]{fontenc}\n'
@@ -860,9 +842,7 @@
no sectnum directive -> suppress section numbers
-\section{section%
- \label{section}%
-}
+\section{section}
""",
'requirements': '\\usepackage[T1]{fontenc}\n'
'\\setcounter{secnumdepth}{0}\n',
@@ -883,9 +863,7 @@
default section numbers -> no requirements
-\section{section%
- \label{section}%
-}
+\section{section}
""",
}],
["""\
@@ -902,9 +880,7 @@
section numbers with custom start and depth
-\section{section%
- \label{section}%
-}
+\section{section}
""",
'requirements': '\\usepackage[T1]{fontenc}\n'
'\\setcounter{secnumdepth}{2}\n'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 07:52:11
|
Revision: 10283
http://sourceforge.net/p/docutils/code/10283
Author: milde
Date: 2026-01-07 07:52:09 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
More relaxed "include" directive.
The options :start-after: and :end-before: may now also be used
with an empty value field (standing for an empty line).
The severity of reported errors is lowered from 4: SEVERE to 3: ERROR.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docs/ref/rst/directives.rst
trunk/docutils/docutils/parsers/rst/directives/misc.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-01-07 07:51:48 UTC (rev 10282)
+++ trunk/docutils/HISTORY.rst 2026-01-07 07:52:09 UTC (rev 10283)
@@ -21,6 +21,12 @@
- Add source and line info to <rubric> elements.
+* docutils/parsers/rst/directives/misc.py,
+
+ - "Include" options :start-after: and :end-before: may now also
+ be used without value (standing for an empty line).
+ - The severity of "include" problems is lowered to 3: ERROR.
+
* docutils/parsers/rst/directives/tables.py,
- Add source and line info to <table> elements.
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:51:48 UTC (rev 10282)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:52:09 UTC (rev 10283)
@@ -89,12 +89,6 @@
* The highlight language of a custom role based on "code" will default to
the role's name in Docutils 0.23.
-* Problems with the "include" directive will be reported as ERROR instead
- of SEVERE in Docutils 0.23.
-
-* The options :start-after: and :end-before: of the "include" directive
- will support empty values (standing for an empty line) in Docutils 0.23.
-
* The "rst" parser will warn if a `"figure"`_ directive is missing both
caption and legend in Docutils 1.0.
@@ -299,6 +293,11 @@
Release 0.23b.dev (unpublished)
===============================
+rST parser:
+ - Problems with the "include" directive are reported as ERROR, not SEVERE.
+ - The "include" directive options :start-after: and :end-before: may now
+ also be used without value (standing for an empty line).
+
Removed objects
`parsers.rst.directives.tables.CSVTable.check_requirements()`
not required with Python 3
Modified: trunk/docutils/docs/ref/rst/directives.rst
===================================================================
--- trunk/docutils/docs/ref/rst/directives.rst 2026-01-07 07:51:48 UTC (rev 10282)
+++ trunk/docutils/docs/ref/rst/directives.rst 2026-01-07 07:52:09 UTC (rev 10283)
@@ -1658,6 +1658,7 @@
Only the content before the first occurrence of the specified *text*
in the external data file (but after any ``start-after`` text)
will be included.
+ If no *text* is given, include content up to the next empty line.
``end-line`` : integer_
Only the content up to (but excluding) this line will be included.
@@ -1687,6 +1688,7 @@
``start-after`` : text_
Only the content after the first occurrence of the specified *text*
in the external data file will be included.
+ If no *text* is given, include content after the next empty line.
``start-line`` : integer_
Only the content starting from this line will be included.
Modified: trunk/docutils/docutils/parsers/rst/directives/misc.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/misc.py 2026-01-07 07:51:48 UTC (rev 10282)
+++ trunk/docutils/docutils/parsers/rst/directives/misc.py 2026-01-07 07:52:09 UTC (rev 10283)
@@ -63,8 +63,8 @@
'tab-width': int,
'start-line': int,
'end-line': int,
- 'start-after': directives.unchanged_required,
- 'end-before': directives.unchanged_required,
+ 'start-after': directives.unchanged,
+ 'end-before': directives.unchanged,
# ignored except for 'literal' or 'code':
'number-lines': directives.value_or((None,), int),
'class': directives.class_option,
@@ -84,8 +84,8 @@
self.tab_width = self.options.get('tab-width', settings.tab_width)
self.clip_options = (self.options.get('start-line', None),
self.options.get('end-line', None),
- self.options.get('start-after', ''),
- self.options.get('end-before', ''))
+ self.options.get('start-after', None),
+ self.options.get('end-before', None))
path = directives.path(self.arguments[0])
if path.startswith('<') and path.endswith('>'):
path = '/' + path[1:-1]
@@ -120,19 +120,19 @@
encoding=encoding,
error_handler=error_handler)
except UnicodeEncodeError:
- raise self.severe(f'Problems with "{self.name}" directive path:\n'
- f'Cannot encode input file path "{path}" '
- '(wrong locale?).')
+ raise self.error(f'Problems with "{self.name}" directive path:\n'
+ f'Cannot encode input file path "{path}" '
+ '(wrong locale?).')
except OSError as error:
- raise self.severe(f'Problems with "{self.name}" directive path:\n'
- f'{io.error_string(error)}.')
+ raise self.error(f'Problems with "{self.name}" directive path:\n'
+ f'{io.error_string(error)}.')
else:
self.settings.record_dependencies.add(path)
try:
text = include_file.read()
except UnicodeError as error:
- raise self.severe(f'Problem with "{self.name}" directive:\n'
- + io.error_string(error))
+ raise self.error(f'Problem with "{self.name}" directive:\n'
+ + io.error_string(error))
# Clip to-be-included content
startline, endline, starttext, endtext = self.clip_options
if startline or (endline is not None):
@@ -140,19 +140,29 @@
text = '\n'.join(lines[startline:endline])
# start-after/end-before: no restrictions on newlines in match-text,
# and no restrictions on matching inside lines vs. line boundaries
+ # exception: emtpy string matches an empty line
+ if starttext == "":
+ # skip content before an empty line
+ starttext = '\n\n'
if starttext:
# skip content in text before *and incl.* a matching text
after_index = text.find(starttext)
if after_index < 0:
- raise self.severe('Problem with "start-after" option of '
- f'"{self.name}" directive:\nText not found.')
- text = text[after_index + len(starttext):]
- if endtext:
+ raise self.error('Problem with "start-after" option of '
+ f'"{self.name}" directive:\nText not found.')
+ else:
+ text = text[after_index + len(starttext):]
+ if endtext == "":
+ # skip content after an empty line
+ before_index = text.find('\n\n')
+ if before_index > 0:
+ text = text[:before_index+1]
+ elif endtext:
# skip content in text after *and incl.* a matching text
before_index = text.find(endtext)
if before_index < 0:
- raise self.severe('Problem with "end-before" option of '
- f'"{self.name}" directive:\nText not found.')
+ raise self.error('Problem with "end-before" option of '
+ f'"{self.name}" directive:\nText not found.')
text = text[:before_index]
return text
@@ -253,7 +263,7 @@
if not include_log: # new document, initialize with document source
current_source = utils.relative_path(
None, self.state.document.current_source)
- include_log.append((current_source, (None, None, '', '')))
+ include_log.append((current_source, (None, None, None, None)))
if (source, self.clip_options) in include_log:
source_chain = (pth for (pth, opt) in reversed(include_log))
inclusion_chain = '\n> '.join((source, *source_chain))
@@ -315,8 +325,8 @@
encoding=encoding,
error_handler=error_handler)
except OSError as error:
- raise self.severe(f'Problems with "{self.name}" directive '
- f'path:\n{io.error_string(error)}.')
+ raise self.error(f'Problems with "{self.name}" directive '
+ f'path:\n{io.error_string(error)}.')
else:
# TODO: currently, raw input files are recorded as
# dependencies even if not used for the chosen output format.
@@ -324,8 +334,8 @@
try:
text = raw_file.read()
except UnicodeError as error:
- raise self.severe(f'Problem with "{self.name}" directive:\n'
- + io.error_string(error))
+ raise self.error(f'Problem with "{self.name}" directive:\n'
+ + io.error_string(error))
attributes['source'] = path
elif 'url' in self.options:
source = self.options['url']
@@ -332,9 +342,9 @@
try:
raw_text = urlopen(source).read()
except (URLError, OSError) as error:
- raise self.severe(f'Problems with "{self.name}" directive URL '
- f'"{self.options["url"]}":\n'
- f'{io.error_string(error)}.')
+ raise self.error(f'Problems with "{self.name}" directive URL '
+ f'"{self.options["url"]}":\n'
+ f'{io.error_string(error)}.')
raw_file = io.StringInput(source=raw_text, source_path=source,
encoding=encoding,
error_handler=error_handler)
@@ -341,8 +351,8 @@
try:
text = raw_file.read()
except UnicodeError as error:
- raise self.severe(f'Problem with "{self.name}" directive:\n'
- + io.error_string(error))
+ raise self.error(f'Problem with "{self.name}" directive:\n'
+ + io.error_string(error))
attributes['source'] = source
else:
# This will always fail because there is no content.
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2026-01-07 07:51:48 UTC (rev 10282)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2026-01-07 07:52:09 UTC (rev 10283)
@@ -315,7 +315,7 @@
<section ids="include-test" names="include\\ test">
<title>
Include Test
- <system_message level="4" line="4" source="test data" type="SEVERE">
+ <system_message level="3" line="4" source="test data" type="ERROR">
<paragraph>
Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: 'nonexistent.rst'.
@@ -573,7 +573,7 @@
<document source="test data">
<paragraph>
Include file is UTF-16-encoded, and is not valid ASCII.
- <system_message level="4" line="3" source="test data" type="SEVERE">
+ <system_message level="3" line="3" source="test data" type="ERROR">
<paragraph>
Problem with "include" directive:
{utf_16_error_str}
@@ -590,7 +590,7 @@
<document source="test data">
<paragraph>
cyrillic filename:
- <system_message level="4" line="3" source="test data" type="SEVERE">
+ <system_message level="3" line="3" source="test data" type="ERROR">
<paragraph>
Problems with "include" directive path:
{errstr_8bit_path}
@@ -634,7 +634,7 @@
<system_message backrefs="hi-1" level="1" line="10" source="{include10}" type="INFO">
<paragraph>
Duplicate implicit target name: "hi".
- <system_message level="4" line="12" source="{include10}" type="SEVERE">
+ <system_message level="3" line="12" source="{include10}" type="ERROR">
<paragraph>
Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: '{nonexistent}'.
@@ -916,7 +916,7 @@
<document source="test data">
<paragraph>
Nonexistent standard include data file:
- <system_message level="4" line="3" source="test data" type="SEVERE">
+ <system_message level="3" line="3" source="test data" type="ERROR">
<paragraph>
Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: '{nonexistent}'.
@@ -1018,7 +1018,7 @@
<document source="test data">
<paragraph>
Include start-after/end-before multi-line test.
- <system_message level="4" line="3" source="test data" type="SEVERE">
+ <system_message level="3" line="3" source="test data" type="ERROR">
<paragraph>
Problem with "end-before" option of "include" directive:
Text not found.
@@ -1044,7 +1044,7 @@
<document source="test data">
<paragraph>
Error handling test; "end-before" error handling tested in previous test.
- <system_message level="4" line="3" source="test data" type="SEVERE">
+ <system_message level="3" line="3" source="test data" type="ERROR">
<paragraph>
Problem with "start-after" option of "include" directive:
Text not found.
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py 2026-01-07 07:51:48 UTC (rev 10282)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py 2026-01-07 07:52:09 UTC (rev 10283)
@@ -136,7 +136,7 @@
<document source="test data">
<paragraph>
Raw input file is UTF-16-encoded, and is not valid ASCII.
- <system_message level="4" line="3" source="test data" type="SEVERE">
+ <system_message level="3" line="3" source="test data" type="ERROR">
<paragraph>
Problem with "raw" directive:
{utf_16_error_str}
@@ -173,7 +173,7 @@
""",
"""\
<document source="test data">
- <system_message level="4" line="1" source="test data" type="SEVERE">
+ <system_message level="3" line="1" source="test data" type="ERROR">
<paragraph>
Problems with "raw" directive path:
InputError: [Errno 2] No such file or directory: 'non-existent.file'.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 07:51:51
|
Revision: 10282
http://sourceforge.net/p/docutils/code/10282
Author: milde
Date: 2026-01-07 07:51:48 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
Remove obsolete method in CSVTable directive class.
`parsers.rst.directives.tables.CSVTable.check_requirements()`
was scheduled for removal in 0.22 but overseen.
Fix "removal-version" for `CSVTable.HeaderDialect` in the docstring.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docutils/parsers/rst/directives/tables.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-01-07 07:51:37 UTC (rev 10281)
+++ trunk/docutils/HISTORY.rst 2026-01-07 07:51:48 UTC (rev 10282)
@@ -24,6 +24,7 @@
* docutils/parsers/rst/directives/tables.py,
- Add source and line info to <table> elements.
+ - Remove `CSVTable.check_requirements()` (not required with Python 3).
* docutils/parsers/rst/states.py
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:51:37 UTC (rev 10281)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:51:48 UTC (rev 10282)
@@ -299,7 +299,9 @@
Release 0.23b.dev (unpublished)
===============================
-.
+Removed objects
+ `parsers.rst.directives.tables.CSVTable.check_requirements()`
+ not required with Python 3
Release 0.22.4 (2025-12-18)
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2026-01-07 07:51:37 UTC (rev 10281)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2026-01-07 07:51:48 UTC (rev 10282)
@@ -226,7 +226,7 @@
"""
CSV dialect used for the "header" option data.
- Deprecated. Will be removed in Docutils 0.22.
+ Deprecated. Will be removed in Docutils 1.0.
"""
# The separate HeaderDialect was introduced in revision 2294
# (2004-06-17) in the sandbox before the "csv-table" directive moved
@@ -257,13 +257,6 @@
DeprecationWarning, stacklevel=2)
super().__init__()
- @staticmethod
- def check_requirements() -> None:
- warnings.warn('CSVTable.check_requirements()'
- ' is not required with Python 3'
- ' and will be removed in Docutils 0.22.',
- DeprecationWarning, stacklevel=2)
-
def process_header_option(self):
source = self.state_machine.get_source(self.lineno - 1)
table_head = []
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 07:51:41
|
Revision: 10281
http://sourceforge.net/p/docutils/code/10281
Author: milde
Date: 2026-01-07 07:51:37 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
Bump version to 0.23b.dev
It seems the 0.22.4 release did not break things.
Let's start with announced changes and new features.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/README.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docutils/__init__.py
trunk/docutils/test/functional/expected/buggy_mathml.html
trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html
trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html
trunk/docutils/test/functional/expected/buggy_mathml_ttm.html
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/length_units_html5.html
trunk/docutils/test/functional/expected/math_experiments_mathml.html
trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html
trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html
trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/mathematics_mathml.html
trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html
trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html
trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/rst_html5_tuftig.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_manpage.man
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
trunk/docutils/test/test_writers/test_manpage.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/HISTORY.rst 2026-01-07 07:51:37 UTC (rev 10281)
@@ -14,8 +14,8 @@
.. contents::
-Release 0.22.5b1.dev (unpublished)
-==================================
+Release 0.23b.dev (unpublished)
+===============================
* docutils/parsers/rst/directives/body.py
Modified: trunk/docutils/README.rst
===================================================================
--- trunk/docutils/README.rst 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/README.rst 2026-01-07 07:51:37 UTC (rev 10281)
@@ -1,5 +1,5 @@
===============================
- README: Docutils 0.22.5b1.dev
+ README: Docutils 0.23b.dev
===============================
:Author: David Goodger
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-01-07 07:51:37 UTC (rev 10281)
@@ -296,8 +296,8 @@
__ https://packages.debian.org/source/trixie/python-docutils
-Release 0.22.5b1.dev (unpublished)
-==================================
+Release 0.23b.dev (unpublished)
+===============================
.
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/docutils/__init__.py 2026-01-07 07:51:37 UTC (rev 10281)
@@ -85,7 +85,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.22.5b1.dev'
+__version__ = '0.23b.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -158,10 +158,10 @@
__version_info__ = VersionInfo(
major=0,
- minor=22,
- micro=5,
+ minor=23,
+ micro=0,
releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
- serial=1, # pre-release number (0 for final releases and snapshots)
+ serial=0, # pre-release number (0 for final releases and snapshots)
release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple.
Modified: trunk/docutils/test/functional/expected/buggy_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/buggy_mathml.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_ttm.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/buggy_mathml_ttm.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>compact_lists.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/dangerous.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>dangerous.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>field_list.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/length_units_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/length_units_html5.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/length_units_html5.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test length specifications</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/mathematics_mathml.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/pep_html.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+ <meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<title>PEP 100 - Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/rst_html5_tuftig.html
===================================================================
--- trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Special Features of the tuftig.css Stylesheet</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2026-01-07 07:51:37 UTC (rev 10281)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.22.5b1.dev -->
+<!-- Generated by Docutils 0.23b.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.rst" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_manpage.man
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2026-01-07 07:51:37 UTC (rev 10281)
@@ -1,5 +1,5 @@
.\" Man page generated from reStructuredText
-.\" by the Docutils 0.22.5b1.dev manpage writer.
+.\" by the Docutils 0.23b.dev manpage writer.
.
.
.nr rst2man-indent-level 0
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2026-01-07 07:51:37 UTC (rev 10281)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.23b.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py 2026-01-07 07:51:16 UTC (rev 10280)
+++ trunk/docutils/test/test_writers/test_manpage.py 2026-01-07 07:51:37 UTC (rev 10281)
@@ -96,7 +96,7 @@
document_start = r""".\" Man page generated from reStructuredText
-.\" by the Docutils 0.22.5b1.dev manpage writer.
+.\" by the Docutils 0.23b.dev manpage writer.
.
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-07 07:51:19
|
Revision: 10280
http://sourceforge.net/p/docutils/code/10280
Author: milde
Date: 2026-01-07 07:51:16 +0000 (Wed, 07 Jan 2026)
Log Message:
-----------
Fix "input_offset" in tables.
When parsing the cell content of grid tables and simple tables,
the "input_offset" passed to the nested parser was off by one line.
This led to wrong "lineno" and "content_offset" attributes in Directive
class instances and to wrong line numbers in system-messages.
Fixes bug #517.
TODO: the reported line numbers for CSV table content are still wrong.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/docutils/parsers/rst/states.py
trunk/docutils/test/test_parsers/test_rst/test_tables.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-01-06 17:29:53 UTC (rev 10279)
+++ trunk/docutils/HISTORY.rst 2026-01-07 07:51:16 UTC (rev 10280)
@@ -22,11 +22,15 @@
- Add source and line info to <rubric> elements.
* docutils/parsers/rst/directives/tables.py,
- docutils/parsers/rst/states.py
- Add source and line info to <table> elements.
+* docutils/parsers/rst/states.py
+ - Add source and line info to <table> elements.
+ - Fix bug #517: wrong "input_offset" when parsing table cell content.
+
+
Release 0.22.4 (2025-12-18)
===========================
Modified: trunk/docutils/docutils/parsers/rst/states.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/states.py 2026-01-06 17:29:53 UTC (rev 10279)
+++ trunk/docutils/docutils/parsers/rst/states.py 2026-01-07 07:51:16 UTC (rev 10280)
@@ -1950,7 +1950,7 @@
entry = nodes.entry(**attributes)
row += entry
if ''.join(cellblock):
- self.nested_parse(cellblock, input_offset=tableline+offset,
+ self.nested_parse(cellblock, input_offset=tableline+offset-1,
node=entry)
return row
Modified: trunk/docutils/test/test_parsers/test_rst/test_tables.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_tables.py 2026-01-06 17:29:53 UTC (rev 10279)
+++ trunk/docutils/test/test_parsers/test_rst/test_tables.py 2026-01-07 07:51:16 UTC (rev 10280)
@@ -752,6 +752,29 @@
Paragraph.
"""],
["""\
+================================= ========
+The ERROR should point to line 2. .. tip::
+================================= ========
+""",
+"""\
+<document source="test data">
+ <table>
+ <tgroup cols="2">
+ <colspec colwidth="33">
+ <colspec colwidth="8">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ The ERROR should point to line 2.
+ <entry>
+ <system_message level="3" line="2" source="test data" type="ERROR">
+ <paragraph>
+ Content block expected for the "tip" directive; none found.
+ <literal_block xml:space="preserve">
+ .. tip::
+"""],
+["""\
============ ============
A table with two columns
and two rows.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2026-01-06 17:29:55
|
Revision: 10279
http://sourceforge.net/p/docutils/code/10279
Author: milde
Date: 2026-01-06 17:29:53 +0000 (Tue, 06 Jan 2026)
Log Message:
-----------
Add internal source and line attributes to "rubric" and "table" nodes.
The rST parser now also adds internal source and line attributes to
`<rubric>` and `<table>` nodes.
TODO: line numbers for content of CSV Tables are wrong
(every cell starts with line nr 1).
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/docutils/parsers/rst/directives/body.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/parsers/rst/states.py
trunk/docutils/test/test_parsers/test_rst/test_source_line.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2025-12-18 19:35:38 UTC (rev 10278)
+++ trunk/docutils/HISTORY.rst 2026-01-06 17:29:53 UTC (rev 10279)
@@ -17,9 +17,16 @@
Release 0.22.5b1.dev (unpublished)
==================================
-.
+* docutils/parsers/rst/directives/body.py
+ - Add source and line info to <rubric> elements.
+* docutils/parsers/rst/directives/tables.py,
+ docutils/parsers/rst/states.py
+
+ - Add source and line info to <table> elements.
+
+
Release 0.22.4 (2025-12-18)
===========================
Modified: trunk/docutils/docutils/parsers/rst/directives/body.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/body.py 2025-12-18 19:35:38 UTC (rev 10278)
+++ trunk/docutils/docutils/parsers/rst/directives/body.py 2026-01-06 17:29:53 UTC (rev 10279)
@@ -250,6 +250,8 @@
rubric_text = self.arguments[0]
textnodes, messages = self.state.inline_text(rubric_text, self.lineno)
rubric = nodes.rubric(rubric_text, '', *textnodes, **options)
+ (rubric.source,
+ rubric.line) = self.state_machine.get_source_and_line(self.lineno)
self.add_name(rubric)
return [rubric] + messages
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2025-12-18 19:35:38 UTC (rev 10278)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2026-01-06 17:29:53 UTC (rev 10279)
@@ -150,6 +150,9 @@
table_node = node[0]
table_node['classes'] += self.options.get('class', [])
self.set_table_width(table_node)
+ # update line-nr to point to the start of the directive
+ table_node.line = self.state_machine.get_source_and_line(
+ self.lineno)[1]
if 'align' in self.options:
table_node['align'] = self.options.get('align')
if isinstance(self.widths, list):
@@ -316,6 +319,8 @@
self.add_name(table_node)
if title:
table_node.insert(0, title)
+ (table_node.source,
+ table_node.line) = self.state_machine.get_source_and_line(self.lineno)
return [table_node] + messages
def get_csv_data(self):
@@ -491,6 +496,8 @@
def build_table_from_list(self, table_data,
col_widths, header_rows, stub_columns):
table = nodes.table()
+ (table.source,
+ table.line) = self.state_machine.get_source_and_line(self.lineno)
if self.widths == 'auto':
table['classes'] += ['colwidths-auto']
elif self.widths: # explicitly set column widths
Modified: trunk/docutils/docutils/parsers/rst/states.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/states.py 2025-12-18 19:35:38 UTC (rev 10278)
+++ trunk/docutils/docutils/parsers/rst/states.py 2026-01-06 17:29:53 UTC (rev 10279)
@@ -1911,6 +1911,8 @@
def build_table(self, tabledata, tableline, stub_columns=0, widths=None):
colwidths, headrows, bodyrows = tabledata
table = nodes.table()
+ (table.source,
+ table.line) = self.state_machine.get_source_and_line(tableline)
if widths == 'auto':
table['classes'] += ['colwidths-auto']
elif widths: # "grid" or list of integers
Modified: trunk/docutils/test/test_parsers/test_rst/test_source_line.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_source_line.py 2025-12-18 19:35:38 UTC (rev 10278)
+++ trunk/docutils/test/test_parsers/test_rst/test_source_line.py 2026-01-06 17:29:53 UTC (rev 10279)
@@ -296,7 +296,7 @@
container content at line 23
-Final paragraph at line 25
+.. rubric:: at line 25
""",
"""\
<document source="test data">
@@ -329,9 +329,102 @@
<container internal:line="21" internal:source="test data">
<paragraph internal:line="23" internal:source="test data">
container content at line 23
- <paragraph internal:line="25" internal:source="test data">
- Final paragraph at line 25
+ <rubric internal:line="25" internal:source="test data">
+ at line 25
"""],
+["""\
+==== ===
+line 2
+==== ===
+
+.. table:: test table
+
+ +--------+
+ | line 8 |
+ +--------+
+ | line 10|
+ +--------+
+""",
+"""\
+<document source="test data">
+ <table internal:line="1" internal:source="test data">
+ <tgroup cols="2">
+ <colspec colwidth="4">
+ <colspec colwidth="3">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph internal:line="2" internal:source="test data">
+ line
+ <entry>
+ <paragraph internal:line="2" internal:source="test data">
+ 2
+ <table internal:line="5" internal:source="test data">
+ <title internal:line="5" internal:source="test data">
+ test table
+ <tgroup cols="1">
+ <colspec colwidth="8">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph internal:line="8" internal:source="test data">
+ line 8
+ <row>
+ <entry>
+ <paragraph internal:line="10" internal:source="test data">
+ line 10
+"""],
+["""\
+.. list-table:: list table
+
+ * - line 3
+""",
+"""\
+<document source="test data">
+ <table internal:line="1" internal:source="test data">
+ <title internal:line="1" internal:source="test data">
+ list table
+ <tgroup cols="1">
+ <colspec colwidth="100">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph internal:line="3" internal:source="test data">
+ line 3
+"""],
+["""\
+.. csv-table:: csv table
+
+ line, 3
+ ".. tip::
+ 5", 5
+""",
+# TODO: in CSV tables, every cell starts with line-number 1!
+"""\
+<document source="test data">
+ <table internal:line="1" internal:source="test data">
+ <title internal:line="1" internal:source="test data">
+ csv table
+ <tgroup cols="2">
+ <colspec colwidth="50">
+ <colspec colwidth="50">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph internal:line="1" internal:source="test data">
+ line
+ <entry>
+ <paragraph internal:line="1" internal:source="test data">
+ 3
+ <row>
+ <entry>
+ <tip internal:line="1" internal:source="test data">
+ <paragraph internal:line="2" internal:source="test data">
+ 5
+ <entry>
+ <paragraph internal:line="1" internal:source="test data">
+ 5
+"""],
])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2025-12-18 19:35:40
|
Revision: 10278
http://sourceforge.net/p/docutils/code/10278
Author: grubert
Date: 2025-12-18 19:35:38 +0000 (Thu, 18 Dec 2025)
Log Message:
-----------
release 0.22.4
Modified Paths:
--------------
trunk/sandbox/infrastructure/releasing-log.rst
Modified: trunk/sandbox/infrastructure/releasing-log.rst
===================================================================
--- trunk/sandbox/infrastructure/releasing-log.rst 2025-12-18 19:31:33 UTC (rev 10277)
+++ trunk/sandbox/infrastructure/releasing-log.rst 2025-12-18 19:35:38 UTC (rev 10278)
@@ -10,6 +10,82 @@
Notes on what happend while releasing.
+Release 0.22.4 (2025-12-18)
+===========================
+
+Quick tiny release for two important bugfixes.
+
+* checkout current code
+* run: tox -epy313
+* set_version 0.22.4
+* run: tox -epy311
+* fix the version_info release=True, releaselevel=final, serial=0
+* run: tox -epy39
+* Check README, HISTORY and RELEASE-NOTES titles.
+* check: svn di
+* svn commit
+* check for swap files: ``find . -name \*.sw\*``
+* build wheel and tgz
+* test tgz and wheel locally
+* update code in working directory
+* tag #.# (Note: only directory docutils is copied)::
+
+ svn copy svn+ssh://grubert@svn.code.sf.net/p/docutils/code/trunk/docutils \
+ svn+ssh://grubert@svn.code.sf.net/p/docutils/code/tags/docutils-0.22.4 \
+ -m "tagging release 0.22.4"
+
+* check on sourceforge: https://sourceforge.net/p/docutils/code/HEAD/tree/tags/
+* update code in build directory
+* update code in working directory
+* upload to pypi
+* remove wheels from cache::
+
+ find .cache/pip/wheels -name docutils\*whl
+
+* test wheel from pypi, ignore missing HISTORY.rst
+* test src.tgz from pypi, ignore missing HISTORY::
+
+ pip install --no-binary docutils docutils
+
+* remove wheels from cache
+* update code in working directory
+* run tox : pass 39, 310, 311, 313, 314
+* upload source and generated html to sf-htdocs/#.# ::
+
+ mkdir tmp1
+ cd tmp1
+ tar xzvf ../dist/docutils-0.22.4.tar.gz
+ cd docutils-0.22.4/
+ python3 tools/buildhtml.py .
+ find . -name \*.pyc -exec rm -v {} \;
+ find . -name __pycache__ -exec rmdir -v {} \;
+ rsync -e ssh -r -t ./ web.sourceforge.net:/home/project-web/docutils/htdocs/0.22.4
+
+* Check https://docutils.sourceforge.io/0.22.4/
+* Check web/index.rst for necessary corrections.
+
+* Release to sourceforge.
+
+ - Upload docutils-0.22.4.tar.gz and release notes to sourceforge.
+ - Upload RELEASE_NOTES.rst as README.rst.
+ - Select docutils-0.22.4.tar.gz as default for all OS.
+
+* update working directory
+* set_version 0.22.5b1.dev
+* tox -ep312
+* tox -epy39 310 312 313 pass
+* tox-epy311 fails : somewhere is 0.22.4
+
+* docutils/HISTORY.rst: add title "Release 0.22.5b1.dev (unpublished)"
+* docutils/RELEASE-NOTES.rst: add title "Release 0.22.5b1.dev (unpublished)"
+* Check README, HISTORY and RELEASE-NOTES titles.
+* svn di
+* commit
+* now tox -epy311 passes
+* run: sandbox/infrastructure/docutils-update.local
+* send notification emails
+
+
Release 0.22.3 (2025-11-06)
===========================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2025-12-18 19:31:36
|
Revision: 10277
http://sourceforge.net/p/docutils/code/10277
Author: grubert
Date: 2025-12-18 19:31:33 +0000 (Thu, 18 Dec 2025)
Log Message:
-----------
release 0.22.5b1.dev
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/README.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docutils/__init__.py
trunk/docutils/test/functional/expected/buggy_mathml.html
trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html
trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html
trunk/docutils/test/functional/expected/buggy_mathml_ttm.html
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/length_units_html5.html
trunk/docutils/test/functional/expected/math_experiments_mathml.html
trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html
trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html
trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/mathematics_mathml.html
trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html
trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html
trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/rst_html5_tuftig.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_manpage.man
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
trunk/docutils/test/test_writers/test_manpage.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/HISTORY.rst 2025-12-18 19:31:33 UTC (rev 10277)
@@ -14,6 +14,12 @@
.. contents::
+Release 0.22.5b1.dev (unpublished)
+==================================
+
+.
+
+
Release 0.22.4 (2025-12-18)
===========================
Modified: trunk/docutils/README.rst
===================================================================
--- trunk/docutils/README.rst 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/README.rst 2025-12-18 19:31:33 UTC (rev 10277)
@@ -1,6 +1,6 @@
-=========================
- README: Docutils 0.22.4
-=========================
+===============================
+ README: Docutils 0.22.5b1.dev
+===============================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/RELEASE-NOTES.rst 2025-12-18 19:31:33 UTC (rev 10277)
@@ -296,6 +296,12 @@
__ https://packages.debian.org/source/trixie/python-docutils
+Release 0.22.5b1.dev (unpublished)
+==================================
+
+.
+
+
Release 0.22.4 (2025-12-18)
===========================
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/docutils/__init__.py 2025-12-18 19:31:33 UTC (rev 10277)
@@ -85,7 +85,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.22.4'
+__version__ = '0.22.5b1.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -159,10 +159,10 @@
__version_info__ = VersionInfo(
major=0,
minor=22,
- micro=4,
- releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
- serial=0, # pre-release number (0 for final releases and snapshots)
- release=True # True for official releases and pre-releases
+ micro=5,
+ releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
+ serial=1, # pre-release number (0 for final releases and snapshots)
+ release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple.
Modified: trunk/docutils/test/functional/expected/buggy_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/buggy_mathml.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_ttm.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/buggy_mathml_ttm.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>compact_lists.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/dangerous.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>dangerous.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>field_list.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/length_units_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/length_units_html5.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/length_units_html5.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test length specifications</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/mathematics_mathml.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/pep_html.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+ <meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<title>PEP 100 - Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/rst_html5_tuftig.html
===================================================================
--- trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Special Features of the tuftig.css Stylesheet</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2025-12-18 19:31:33 UTC (rev 10277)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.22.4 -->
+<!-- Generated by Docutils 0.22.5b1.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.rst" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_manpage.man
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2025-12-18 19:31:33 UTC (rev 10277)
@@ -1,5 +1,5 @@
.\" Man page generated from reStructuredText
-.\" by the Docutils 0.22.4 manpage writer.
+.\" by the Docutils 0.22.5b1.dev manpage writer.
.
.
.nr rst2man-indent-level 0
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2025-12-18 19:31:33 UTC (rev 10277)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.5b1.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py 2025-12-18 18:56:44 UTC (rev 10276)
+++ trunk/docutils/test/test_writers/test_manpage.py 2025-12-18 19:31:33 UTC (rev 10277)
@@ -96,7 +96,7 @@
document_start = r""".\" Man page generated from reStructuredText
-.\" by the Docutils 0.22.4 manpage writer.
+.\" by the Docutils 0.22.5b1.dev manpage writer.
.
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2025-12-18 18:56:45
|
Revision: 10276
http://sourceforge.net/p/docutils/code/10276
Author: grubert
Date: 2025-12-18 18:56:44 +0000 (Thu, 18 Dec 2025)
Log Message:
-----------
tagging release 0.22.4
Added Paths:
-----------
tags/docutils-0.22.4/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2025-12-18 18:44:57
|
Revision: 10275
http://sourceforge.net/p/docutils/code/10275
Author: grubert
Date: 2025-12-18 18:44:54 +0000 (Thu, 18 Dec 2025)
Log Message:
-----------
release 0.22.4
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/README.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docutils/__init__.py
trunk/docutils/test/functional/expected/buggy_mathml.html
trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html
trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html
trunk/docutils/test/functional/expected/buggy_mathml_ttm.html
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/length_units_html5.html
trunk/docutils/test/functional/expected/math_experiments_mathml.html
trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html
trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html
trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/mathematics_mathml.html
trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html
trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html
trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/rst_html5_tuftig.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_manpage.man
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
trunk/docutils/test/test_writers/test_manpage.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/HISTORY.rst 2025-12-18 18:44:54 UTC (rev 10275)
@@ -14,8 +14,8 @@
.. contents::
-Release 0.22.4b1 (unpublished)
-==============================
+Release 0.22.4 (2025-12-18)
+===========================
* docutils/io.py
Modified: trunk/docutils/README.rst
===================================================================
--- trunk/docutils/README.rst 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/README.rst 2025-12-18 18:44:54 UTC (rev 10275)
@@ -1,6 +1,6 @@
-===============================
- README: Docutils 0.22.4b1.dev
-===============================
+=========================
+ README: Docutils 0.22.4
+=========================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/RELEASE-NOTES.rst 2025-12-18 18:44:54 UTC (rev 10275)
@@ -296,8 +296,8 @@
__ https://packages.debian.org/source/trixie/python-docutils
-Release 0.22.4b1 (unpublished)
-==============================
+Release 0.22.4 (2025-12-18)
+===========================
reStructuredText Specification:
- Clarify indentation rules: minimal indentation is *one* space.
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/docutils/__init__.py 2025-12-18 18:44:54 UTC (rev 10275)
@@ -85,7 +85,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.22.4b1.dev'
+__version__ = '0.22.4'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -160,9 +160,9 @@
major=0,
minor=22,
micro=4,
- releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
- serial=1, # pre-release number (0 for final releases and snapshots)
- release=False # True for official releases and pre-releases
+ releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
+ serial=0, # pre-release number (0 for final releases and snapshots)
+ release=True # True for official releases and pre-releases
)
"""Comprehensive version information tuple.
Modified: trunk/docutils/test/functional/expected/buggy_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/buggy_mathml.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/buggy_mathml_blahtexml.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/buggy_mathml_pandoc.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/buggy_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/buggy_mathml_ttm.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/buggy_mathml_ttm.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>buggy-maths</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>compact_lists.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/dangerous.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>dangerous.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>field_list.rst</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/length_units_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/length_units_html5.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/length_units_html5.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test length specifications</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_blahtexml.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_pandoc.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_experiments_mathml_ttm.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Math Conversion Tests</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/mathematics_mathml.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_blahtexml.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_pandoc.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html
===================================================================
--- trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/mathematics_mathml_ttm.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>LaTeX syntax for mathematics</title>
<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/pep_html.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+ <meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<title>PEP 100 - Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/rst_html5_tuftig.html
===================================================================
--- trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Special Features of the tuftig.css Stylesheet</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2025-12-18 18:44:54 UTC (rev 10275)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.22.4b1.dev -->
+<!-- Generated by Docutils 0.22.4 -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.rst" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_manpage.man
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2025-12-18 18:44:54 UTC (rev 10275)
@@ -1,5 +1,5 @@
.\" Man page generated from reStructuredText
-.\" by the Docutils 0.22.4b1.dev manpage writer.
+.\" by the Docutils 0.22.4 manpage writer.
.
.
.nr rst2man-indent-level 0
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2025-12-18 18:44:54 UTC (rev 10275)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.22.4b1.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.22.4: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py 2025-12-17 10:38:57 UTC (rev 10274)
+++ trunk/docutils/test/test_writers/test_manpage.py 2025-12-18 18:44:54 UTC (rev 10275)
@@ -96,7 +96,7 @@
document_start = r""".\" Man page generated from reStructuredText
-.\" by the Docutils 0.22.4b1.dev manpage writer.
+.\" by the Docutils 0.22.4 manpage writer.
.
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-17 10:38:59
|
Revision: 10274
http://sourceforge.net/p/docutils/code/10274
Author: milde
Date: 2025-12-17 10:38:57 +0000 (Wed, 17 Dec 2025)
Log Message:
-----------
Finalise documentation of changes for 0.22.4.
Clarify wording.
Announce future change to "self-link" setting.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/RELEASE-NOTES.rst
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2025-12-16 17:39:48 UTC (rev 10273)
+++ trunk/docutils/HISTORY.rst 2025-12-17 10:38:57 UTC (rev 10274)
@@ -32,6 +32,8 @@
* docutils/writers/html/*
- New value "auto" for `initial_header_level`_ configuration setting.
+ Produces a HTML document with valid "outline" for documents
+ with document title as well as documents without document title.
* docutils/writers/html5_polyglot/responsive.css
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2025-12-16 17:39:48 UTC (rev 10273)
+++ trunk/docutils/RELEASE-NOTES.rst 2025-12-17 10:38:57 UTC (rev 10274)
@@ -87,13 +87,13 @@
has content above and below directive options in Docutils 0.23.
* The highlight language of a custom role based on "code" will default to
- its name in Docutils 0.23.
+ the role's name in Docutils 0.23.
* Problems with the "include" directive will be reported as ERROR instead
- of SEVERE in Docutils 1.0.
+ of SEVERE in Docutils 0.23.
* The options :start-after: and :end-before: of the "include" directive
- will support empty values (standing for an empty line).
+ will support empty values (standing for an empty line) in Docutils 0.23.
* The "rst" parser will warn if a `"figure"`_ directive is missing both
caption and legend in Docutils 1.0.
@@ -122,6 +122,9 @@
__ docs/ref/rst/restructuredtext.html#explicit-hyperlink-targets
+ - The default of the self-link_ configuration setting will change to
+ "True" in Docutils 1.0.
+
- Prefer explicit reference names as base for an HTML element's ID
in Docutils 1.0. No change for internal cross-references.
Cf. `Sphinx issue #1961`__
@@ -152,14 +155,14 @@
- Change default of legacy_column_widths_ setting to False
in Docutils 1.0.
- - Remove ``use_verbatim_when_possible`` setting
- (use literal_block_env_: verbatim) in Docutils 2.0.
-
- The `default length unit`__ will change from "bp" (DTP point)
to "px" (pixel unit) in Docutils 1.0.
__ docs/user/latex.html#length-units
+ - Remove ``use_verbatim_when_possible`` setting
+ (use literal_block_env_: verbatim) in Docutils 2.0.
+
* "manpage" writer:
- Change default of the text_references_ setting to False in Docutils 1.0.
@@ -296,10 +299,17 @@
Release 0.22.4b1 (unpublished)
==============================
+reStructuredText Specification:
+ - Clarify indentation rules: minimal indentation is *one* space.
+ - Clarify comment syntax: Comments begin with two dots and *whitespace*.
+
HTML writers:
- New value "auto" for the initial_header_level_ setting.
+ - Bugfixes in the provisional style-sheet "responsive.css".
+See HISTORY_ for details.
+
Release 0.22.3 (2025-11-06)
===========================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-16 17:39:51
|
Revision: 10273
http://sourceforge.net/p/docutils/code/10273
Author: milde
Date: 2025-12-16 17:39:48 +0000 (Tue, 16 Dec 2025)
Log Message:
-----------
More documentation fixes.
Less confusing example for auto-numbered footnote reference
in the rST specification.
Check and fix spelling in enhancement proposal 10.
Modified Paths:
--------------
trunk/docutils/docs/eps/ep-010.rst
trunk/docutils/docs/ref/rst/restructuredtext.rst
Modified: trunk/docutils/docs/eps/ep-010.rst
===================================================================
--- trunk/docutils/docs/eps/ep-010.rst 2025-12-14 13:20:59 UTC (rev 10272)
+++ trunk/docutils/docs/eps/ep-010.rst 2025-12-16 17:39:48 UTC (rev 10273)
@@ -29,7 +29,7 @@
below 1.0 (widely seen as an indicator of "beta" status of a project).
The current `Docutils Project Policies`_ section on `version
-identifcation`_ concentrates on the formal definition of the version
+identification`_ concentrates on the formal definition of the version
specifier but leaves open what consists a "major change in the design
or API".
@@ -70,7 +70,7 @@
- re-implementations of the `reStructuredText specification`_,
e.g. Pandoc_ or Text-Restructured_ (prest).
-A person may belong to more than one of these catgories.
+A person may belong to more than one of these categories.
.. _Sphinx: https://www.sphinx-doc.org/
.. _rsted: https://github.com/anru/rsted
@@ -117,7 +117,7 @@
.. html4css1.css, minimal.css, docutils.sty (LaTeX), styles.odt
* the interface to custom stylesheets -- elements, macros and classes
- used by writers to represent doctree_ nodes in the output format.
+ used by writers to represent Doctree_ nodes in the output format.
Exemptions:
Python objects, stylesheets and templates can explicitly "opt-out" of
@@ -246,12 +246,12 @@
* Use "private" or "internal"?
* Declare only objects included in the ``__all__`` attribute of their
- parent objects as public rsp. explicitely list all public objects in
+ parent objects as public resp. explicitly list all public objects in
``__all__`` attribute of their parents?
This would hide private objects from `pydoc` help on the parent objects.
-* Define a minimum deprecation time similar to Docbook__? E.g.
+* Define a minimum deprecation time similar to DocBook__? E.g.
* A "major" release may contain backward-incompatible changes if:
@@ -281,7 +281,7 @@
.. _Docutils Design Specification: ../peps/pep-0258.html
.. _Docutils Project Policies: ../dev/policies.html
.. _version specifier:
-.. _version identifcation:
+.. _version identification:
../dev/policies.html#version-identification
.. _backwards compatibility policy:
../dev/policies.html#backwards-compatibility-policy
Modified: trunk/docutils/docs/ref/rst/restructuredtext.rst
===================================================================
--- trunk/docutils/docs/ref/rst/restructuredtext.rst 2025-12-14 13:20:59 UTC (rev 10272)
+++ trunk/docutils/docs/ref/rst/restructuredtext.rst 2025-12-16 17:39:48 UTC (rev 10273)
@@ -3004,7 +3004,8 @@
Please RTFM [1]_. [#]_
.. [1] Read The Fine Manual
- .. [#] See "footnotes_" for the format of the *footnote label*.
+ .. [#] Life is too short for man pages,
+ and occasionally much too short without them.
`Inline markup recognition rules`_ may require whitespace in front of the
footnote reference. To remove the whitespace from the output, use an
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-14 13:21:02
|
Revision: 10272
http://sourceforge.net/p/docutils/code/10272
Author: milde
Date: 2025-12-14 13:20:59 +0000 (Sun, 14 Dec 2025)
Log Message:
-----------
Documentation update
Announce change to "ids" handling in case of a name conflict between
explicit and implicit targets.
Update security howto.
Add hyperlink target for the description of the special syntax for
Standard Definition Files in the "include" directive documentation.
Small fixes and additions to documentation and comments.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docs/howto/security.rst
trunk/docutils/docs/index.rst
trunk/docutils/docs/ref/rst/directives.rst
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/utils/urischemes.py
trunk/docutils/docutils/writers/_html_base.py
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2025-12-14 11:03:06 UTC (rev 10271)
+++ trunk/docutils/RELEASE-NOTES.rst 2025-12-14 13:20:59 UTC (rev 10272)
@@ -75,6 +75,11 @@
<substitution_definition>, and <target> elements when warning about
transitions at the start or end of the document or a section.
+* In case of name conflicts, an explicit target will not only override
+ the "name" attribute of an implicit target but also its name-based "id".
+ Use case: "sane" anchors for links from an external source to a fragment
+ of the document. Cf. https://github.com/sphinx-doc/sphinx/issues/1961
+
Parsers
-------
@@ -291,7 +296,8 @@
Release 0.22.4b1 (unpublished)
==============================
-.
+HTML writers:
+ - New value "auto" for the initial_header_level_ setting.
Release 0.22.3 (2025-11-06)
Modified: trunk/docutils/docs/howto/security.rst
===================================================================
--- trunk/docutils/docs/howto/security.rst 2025-12-14 11:03:06 UTC (rev 10271)
+++ trunk/docutils/docs/howto/security.rst 2025-12-14 13:20:59 UTC (rev 10272)
@@ -42,26 +42,26 @@
* Files may be **written to any location** accessible to the process.
* There are **no restrictions to** the **file names**.
-Special care must be taken when allowing users to configure the *output
-destination* or the `warning_stream`_, `record_dependencies`_, or
-`_destination`_ settings.
+Special care must be taken when allowing users to configure the `output`_
+(or `_destination`_), `warning_stream`_, or `record_dependencies`_ settings.
+.. _output: ../user/config.html#output
+.. _`_destination`: ../user/config.html#destination
.. _warning_stream: ../user/config.html#warning-stream
.. _record_dependencies: ../user/config.html#record-dependencies
-.. _`_destination`: ../user/config.html#destination
External Data Insertion
-----------------------
-There are several `reStructuredText directives`_ that can insert
-external data (files and URLs) into the output document. These
-directives are:
+There are several `reStructuredText directives`_ that can insert external
+data (files or content fetched from a URL) into the output document.
+These directives are:
* "include_", by its very nature,
* "raw_", through its ``:file:`` and ``:url:`` options,
* "csv-table_", through its ``:file:`` and ``:url:`` options,
-* "image_", if `embed_images`_ is true.
+* "image_" through its ``:loading:`` option.
The "include_" directive and the other directives' file insertion
features can be disabled by setting "file_insertion_enabled_" to
@@ -70,7 +70,7 @@
__ ../user/config.html#configuration-file-syntax
.. _reStructuredText directives: ../ref/rst/directives.html
.. _include: ../ref/rst/directives.html#include
-.. _raw: ../ref/rst/directives.html#raw-directive
+.. _raw: ../ref/rst/directives.html#raw
.. _csv-table: ../ref/rst/directives.html#csv-table
.. _image: ../ref/rst/directives.html#image
.. _embed_images: ../user/config.html#embed-images
@@ -80,15 +80,19 @@
Raw HTML Insertion
------------------
-The "raw_" directive is intended for the insertion of
-non-reStructuredText data that is passed untouched to the Writer.
-This directive can be abused to bypass site features or insert
-malicious JavaScript code into a web page. The "raw_" directive can
-be disabled by setting "raw_enabled_" to "false".
+Content of the "raw_" directive is passed untouched to the Writer.
+Docutils standard writers insert "raw" content with matching
+format_ into the output document without any checks or changes.
+This can be abused to bypass site features or insert malicious
+script code into a web page.
+A web-secure Writer must ignore or sanitize "raw" content.
+Alternatively, the "raw" directive can be disabled by setting
+"raw_enabled_" to "false".
+
.. _raw_enabled: ../user/config.html#raw-enabled
+.. _format: ../ref/doctree.html#format
-
CPU and memory utilization
--------------------------
Modified: trunk/docutils/docs/index.rst
===================================================================
--- trunk/docutils/docs/index.rst 2025-12-14 11:03:06 UTC (rev 10271)
+++ trunk/docutils/docs/index.rst 2025-12-14 13:20:59 UTC (rev 10272)
@@ -126,7 +126,7 @@
become reference material. Successful specs evolve into refs.
Docutils-general:
- * `The Docutils Document Tree <ref/doctree.html>`__ (incomplete)
+ * `The Docutils Document Tree <ref/doctree.html>`__
* `Docutils Generic DTD <ref/docutils.dtd>`__
* `OASIS XML Exchange Table Model Declaration Module
<ref/soextblx.dtd>`__ (CALS tables DTD module)
Modified: trunk/docutils/docs/ref/rst/directives.rst
===================================================================
--- trunk/docutils/docs/ref/rst/directives.rst 2025-12-14 11:03:06 UTC (rev 10271)
+++ trunk/docutils/docs/ref/rst/directives.rst 2025-12-14 13:20:59 UTC (rev 10272)
@@ -1627,11 +1627,14 @@
If an included document fragment contains section structure, the title
adornments must match those of the master document.
-Standard data files intended for inclusion in reStructuredText
-documents are distributed with the Docutils source code, located in
+.. _include Standard Definition files:
+
+`reStructuredText Standard Definition Files`_
+intended for inclusion in reStructuredText documents
+are distributed with the Docutils source code, located in
the "docutils" package in the ``docutils/parsers/rst/include``
-directory. To access these files, use the special syntax for standard
-"include" data files, angle brackets around the file name::
+directory. To access these files, use the *special syntax for standard
+definition files*: angle brackets around the file name, e.g. ::
.. include:: <isonum.txt>
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2025-12-14 11:03:06 UTC (rev 10271)
+++ trunk/docutils/docutils/nodes.py 2025-12-14 13:20:59 UTC (rev 10272)
@@ -1995,14 +1995,14 @@
# "note" here is an imperative verb: "take note of".
def note_implicit_target(
self, target: Element, msgnode: Element | None = None) -> None:
- # TODO: Postpone ID creation. Register reference name instead of ID
- # to allow for IDs based on explicit target pointing to the same
- # element. https://github.com/sphinx-doc/sphinx/issues/1961
+ # TODO: Postpone ID creation and register reference name instead of ID?
id = self.set_id(target, msgnode)
self.set_name_id_map(target, id, msgnode, explicit=False)
def note_explicit_target(
self, target: Element, msgnode: Element | None = None) -> None:
+ # TODO: if the id matching the name is applied to an implicid target,
+ # transfer it to this target and put a "disambiguated" id on the other.
id = self.set_id(target, msgnode)
self.set_name_id_map(target, id, msgnode, explicit=True)
Modified: trunk/docutils/docutils/utils/urischemes.py
===================================================================
--- trunk/docutils/docutils/utils/urischemes.py 2025-12-14 11:03:06 UTC (rev 10271)
+++ trunk/docutils/docutils/utils/urischemes.py 2025-12-14 13:20:59 UTC (rev 10272)
@@ -35,7 +35,7 @@
'(facsimiles); RFC 2806',
'feed': 'NetNewsWire feed',
'file': 'Host-specific file names; RFC 1738',
- 'finger': '',
+ 'finger': 'Querying user information using the Finger protocol',
'freenet': '',
'ftp': 'File Transfer Protocol; RFC 1738',
'go': 'go; RFC 3368',
@@ -99,7 +99,7 @@
'rx': 'Remote Execution',
'sdp': '',
'service': 'service location; RFC 2609',
- 'shttp': 'secure hypertext transfer protocol',
+ 'shttp': 'secure hypertext transfer protocol (OBSOLETE)',
'sip': 'Session Initiation Protocol; RFC 3261',
'sips': 'secure session intitiaion protocol; RFC 3261',
'smb': 'SAMBA filesystems.',
@@ -124,7 +124,7 @@
'urn': 'Uniform Resource Name; RFC 2141',
'uuid': '',
'vemmi': 'versatile multimedia interface; RFC 2122',
- 'videotex': '',
+ 'videotex': 'videotex (historical)',
'view-source': 'displays HTML code that was generated with JavaScript',
'wais': 'Wide Area Information Servers; RFC 4156',
'whodp': '',
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2025-12-14 11:03:06 UTC (rev 10271)
+++ trunk/docutils/docutils/writers/_html_base.py 2025-12-14 13:20:59 UTC (rev 10272)
@@ -637,6 +637,9 @@
return
child['classes'].append(class_)
+ # Visitor methods
+ # ---------------
+
def visit_Text(self, node) -> None:
text = node.astext()
encoded = self.encode(text)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-14 11:03:08
|
Revision: 10271
http://sourceforge.net/p/docutils/code/10271
Author: milde
Date: 2025-12-14 11:03:06 +0000 (Sun, 14 Dec 2025)
Log Message:
-----------
Fix statement in rST Specification example.
The rST specification states in one example that
"A footnote contains body elements, consistently indented by at least 3 spaces."
The minimal indentation in rST is one space.
Fix the example.
Add more examples.
Sort.
Cf. https://stackoverflow.com/a/48313531/12090995
Fixes [bugs:#515]
Modified Paths:
--------------
trunk/docutils/docs/ref/rst/restructuredtext.rst
Modified: trunk/docutils/docs/ref/rst/restructuredtext.rst
===================================================================
--- trunk/docutils/docs/ref/rst/restructuredtext.rst 2025-12-03 11:38:54 UTC (rev 10270)
+++ trunk/docutils/docs/ref/rst/restructuredtext.rst 2025-12-14 11:03:06 UTC (rev 10271)
@@ -179,8 +179,11 @@
- Footnotes_::
.. [1] A footnote contains body elements, consistently
- indented by at least 3 spaces.
+ indented by at least 1 space.
+ The least indented line sets the reference
+ indentation, so this is a nested block quote.
+
- Citations_::
.. [CIT2002] Just like a footnote, except the label is
@@ -249,7 +252,19 @@
Indentation
-----------
-Indentation is used to indicate -- and is only significant in
+When a paragraph or other construct consists of more than one line of
+text, the lines must be left-aligned::
+
+ This is a paragraph. The lines of
+ this paragraph are aligned at the left.
+
+ This paragraph has problems. The
+ lines are not left-aligned. In addition
+ to potential misinterpretation, warning
+ and/or error messages will be generated
+ by the parser.
+
+*Indentation* is used to indicate -- and is only significant in
indicating -- block quotes, definitions (in `definition lists`_),
and local nested content:
@@ -272,9 +287,12 @@
Paragraph 2 of the first-level block quote.
-Multiple levels of indentation within a block quote will result in
-more complex structures::
+.. _reference indentation:
+Multiple levels of indentation within a block will result in more
+complex structures. The least indented line of a block sets the
+*reference indentation*::
+
This is a top-level paragraph.
This paragraph belongs to a first-level block quote.
@@ -285,22 +303,15 @@
This paragraph belongs to a second-level block quote.
- This paragraph belongs to a first-level block quote. The
- second-level block quote above is inside this first-level
- block quote.
+ This paragraph belongs to a first-level block quote.
+ The second-level block quote above is inside this
+ first-level block quote.
-When a paragraph or other construct consists of more than one line of
-text, the lines must be left-aligned::
+ Every block has its own reference indentation::
- This is a paragraph. The lines of
- this paragraph are aligned at the left.
+ This paragraph belongs to a first-level block quote
+ because there is no less indented line in the block.
- This paragraph has problems. The
- lines are not left-aligned. In addition
- to potential misinterpretation, warning
- and/or error messages will be generated
- by the parser.
-
Several constructs begin with a marker, and the body of the construct
must be indented relative to the marker. For constructs using simple
markers (`bullet lists`_, `enumerated lists`_), the level of
@@ -320,20 +331,34 @@
this paragraph does not belong to the list
item (it's a block quote following the list).
+The first line of text may start below the marker::
+
+ 1.
+ This is the first line of an enumeration
+ item's paragraph.
+
+ This indented paragraph is interpreted
+ as a block quote.
+
+ This paragraph still belongs to the list
+ item
+
+ This paragraph ends the list.
+
The body of `explicit markup blocks`_, `field lists`_, and `option
lists`_ ends above the first line with the same or less indentation
than the marker. For example, field lists may have very long markers
(containing the field names)::
- :Hello: This field has a short field name, so aligning the field
- body with the first line is feasible.
+ :Hello: This field has a short field name, so aligning
+ the field body with the first line is feasible.
+ :Long field name: It would be inconvenient to align the
+ field body with the left edge of the first line.
+ :Number of African swallows required to carry a coconut:
+ Sometimes, it is preferable to begin the body
+ on the next line.
- :Number-of-African-swallows-required-to-carry-a-coconut: It would
- be very difficult to align the field body with the left edge
- of the first line. It may even be preferable not to begin the
- body on the same line as the marker.
-
.. _escape:
Escaping Mechanism
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-03 11:38:57
|
Revision: 10270
http://sourceforge.net/p/docutils/code/10270
Author: milde
Date: 2025-12-03 11:38:54 +0000 (Wed, 03 Dec 2025)
Log Message:
-----------
New value "auto" for "initial_header_level" config setting.
``initial_header_level: auto`` tells the HTML writer to use
<h2> if there is a document title, else <h1>.
This ensures a valid "outline" of the HTML document (top heading level 1,
nested headings one level below their parent).
Cf. https://html.spec.whatwg.org/multipage/sections.html#outline
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/docs/user/config.rst
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html4css1/__init__.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2025-12-02 19:48:48 UTC (rev 10269)
+++ trunk/docutils/HISTORY.rst 2025-12-03 11:38:54 UTC (rev 10270)
@@ -17,6 +17,11 @@
Release 0.22.4b1 (unpublished)
==============================
+* docutils/io.py
+
+ - Ensure `FileInput.read()` returns a `str` (decode if `source.read`
+ returns `bytes`. Fixes bug #514.
+
* docutils/parsers/rst/directives/body.py,
docutils/parsers/rst/directives/parts.py
@@ -24,6 +29,10 @@
auxiliary elements belonging to several categories (e.g. `nodes.Root`
and `nodes.BodyElements`) as parents of topics or sidebars.
+* docutils/writers/html/*
+
+ - New value "auto" for `initial_header_level`_ configuration setting.
+
* docutils/writers/html5_polyglot/responsive.css
- Increase indentation of enumerated lists to fit 2-digit numerals
Modified: trunk/docutils/docs/user/config.rst
===================================================================
--- trunk/docutils/docs/user/config.rst 2025-12-02 19:48:48 UTC (rev 10269)
+++ trunk/docutils/docs/user/config.rst 2025-12-03 11:38:54 UTC (rev 10270)
@@ -1195,13 +1195,23 @@
initial_header_level
~~~~~~~~~~~~~~~~~~~~
-The initial level for section header elements. This does not affect the
-document title & subtitle; see doctitle_xform_.
+The level of the first *section* heading element
+(the `document title`_ always uses <h1>).
+Supported values:
+:1, ..., 6: <h1>, ..., <h6>,
+:auto: <h2> if there is a `document title`_, else <h1>. [#auto-header-level]_
+
+See also `doctitle_xform`_.
+
:Default: writer dependent
(see `[html4css1 writer]`_, `[html5 writer]`_, `[pep_html writer]`_).
:Option: ``--initial-header-level``.
+.. [#auto-header-level] Ensures the HTML document has a valid outline__
+ in documents with/without a document title.
+ New in Docutils 0.22.3.
+__ https://html.spec.whatwg.org/multipage/sections.html#outline
math_output
~~~~~~~~~~~
@@ -1489,14 +1499,8 @@
"minimal.css, plain.css".
:`xml_declaration <xml_declaration [html writers]_>`__: False.
-.. [#] Documents without (visible) document title may have <h2> as highest
- heading level, which is not recommended but valid (cf. "`Headings and
- outlines`__" in the HTML Standard). The default will change to None
- (<h2> if there is a document title, else <h1>) in Docutils 1.0.
+.. [#] The default will change to "auto" in Docutils 1.0.
-__ https://html.spec.whatwg.org/multipage/sections.html
- #headings-and-outlines-2
-
image_loading
"""""""""""""
Indicate at which point images should be loaded.
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2025-12-02 19:48:48 UTC (rev 10269)
+++ trunk/docutils/docutils/writers/_html_base.py 2025-12-03 11:38:54 UTC (rev 10270)
@@ -85,7 +85,7 @@
'Does not affect document title & subtitle (see --no-doc-title).'
'(default: writer dependent).',
['--initial-header-level'],
- {'choices': '1 2 3 4 5 6'.split(), 'default': '2',
+ {'choices': '1 2 3 4 5 6 auto'.split(), 'default': '2',
'metavar': '<level>'}),
('Format for footnote references: one of "superscript" or '
'"brackets". (default: "brackets")',
@@ -295,7 +295,14 @@
settings = self.settings
self.language = languages.get_language(
settings.language_code, document.reporter)
- self.initial_header_level = int(settings.initial_header_level)
+ if settings.initial_header_level == 'auto':
+ if len(document) and document[0].next_node(
+ nodes.title, include_self=True, descend=False):
+ self.initial_header_level = 2
+ else:
+ self.initial_header_level = 1
+ else:
+ self.initial_header_level = int(settings.initial_header_level)
# image_loading (only defined for HTML5 writer)
_image_loading_default = 'link'
# convert legacy setting embed_images:
Modified: trunk/docutils/docutils/writers/html4css1/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html4css1/__init__.py 2025-12-02 19:48:48 UTC (rev 10269)
+++ trunk/docutils/docutils/writers/html4css1/__init__.py 2025-12-03 11:38:54 UTC (rev 10270)
@@ -68,7 +68,7 @@
'Specify the initial header level. Does not affect document '
'title & subtitle (see --no-doc-title). (default: 1 for "<h1>")',
['--initial-header-level'],
- {'choices': '1 2 3 4 5 6'.split(), 'default': '1',
+ {'choices': '1 2 3 4 5 6 auto'.split(), 'default': '1',
'metavar': '<level>'}),
math_output=(
'Math output format (one of "MathML", "HTML", "MathJax", or '
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2025-12-02 19:48:48 UTC (rev 10269)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2025-12-03 11:38:54 UTC (rev 10270)
@@ -73,7 +73,7 @@
'Specify the initial header level. Does not affect document '
'title & subtitle (see --no-doc-title). (default: 2 for "<h2>")',
['--initial-header-level'],
- {'choices': '1 2 3 4 5 6'.split(), 'default': '2',
+ {'choices': '1 2 3 4 5 6 auto'.split(), 'default': '2',
'metavar': '<level>'}),
no_xml_declaration=(
'Omit the XML declaration (default).',
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2025-12-02 19:48:48 UTC (rev 10269)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2025-12-03 11:38:54 UTC (rev 10270)
@@ -119,7 +119,8 @@
totest = {}
-totest['standard'] = ({}, [
+totest['standard'] = ({'initial_header_level': 'auto' # becomes standard in 1.0
+ }, [
['', # empty input string
{} # results in default parts
],
@@ -231,7 +232,8 @@
}],
])
-totest['no_title_promotion'] = ({'doctitle_xform': False}, [
+totest['no_title_promotion'] = ({'doctitle_xform': False,
+ 'initial_header_level': 'auto'}, [
["""\
+++++
Title
@@ -254,15 +256,15 @@
""",
{'fragment': """\
<section id="title">
-<h2>Title<a class="self-link" title="link to this section" href="#title"></a></h2>
+<h1>Title<a class="self-link" title="link to this section" href="#title"></a></h1>
<section id="not-a-subtitle">
-<h3>Not A Subtitle<a class="self-link" title="link to this section" href="#not-a-subtitle"></a></h3>
+<h2>Not A Subtitle<a class="self-link" title="link to this section" href="#not-a-subtitle"></a></h2>
<p>Some stuff</p>
<section id="section">
-<h4>Section<a class="self-link" title="link to this section" href="#section"></a></h4>
+<h3>Section<a class="self-link" title="link to this section" href="#section"></a></h3>
<p>Some more stuff</p>
<section id="another-section">
-<h5>Another Section<a class="self-link" title="link to this section" href="#another-section"></a></h5>
+<h4>Another Section<a class="self-link" title="link to this section" href="#another-section"></a></h4>
<p>And even more stuff</p>
</section>
</section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-02 19:48:51
|
Revision: 10269
http://sourceforge.net/p/docutils/code/10269
Author: milde
Date: 2025-12-02 19:48:48 +0000 (Tue, 02 Dec 2025)
Log Message:
-----------
Announce upcoming changes.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.rst
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2025-12-02 19:48:42 UTC (rev 10268)
+++ trunk/docutils/RELEASE-NOTES.rst 2025-12-02 19:48:48 UTC (rev 10269)
@@ -71,6 +71,10 @@
The rST parser will handle a `doctest block`_ similar to a "code" directive
with language "pycon" (Python console) and generate a <literal_block>.
+* The `Transitions` transform will ignore <pending>,
+ <substitution_definition>, and <target> elements when warning about
+ transitions at the start or end of the document or a section.
+
Parsers
-------
@@ -77,6 +81,15 @@
* The "rst" parser will warn, if a directive that does not take arguments
has content above and below directive options in Docutils 0.23.
+* The highlight language of a custom role based on "code" will default to
+ its name in Docutils 0.23.
+
+* Problems with the "include" directive will be reported as ERROR instead
+ of SEVERE in Docutils 1.0.
+
+* The options :start-after: and :end-before: of the "include" directive
+ will support empty values (standing for an empty line).
+
* The "rst" parser will warn if a `"figure"`_ directive is missing both
caption and legend in Docutils 1.0.
@@ -104,6 +117,12 @@
__ docs/ref/rst/restructuredtext.html#explicit-hyperlink-targets
+ - Prefer explicit reference names as base for an HTML element's ID
+ in Docutils 1.0. No change for internal cross-references.
+ Cf. `Sphinx issue #1961`__
+
+ __ https://github.com/sphinx-doc/sphinx/issues/1961
+
- Move attribution behind the blockquote to comply with the
`"HTML living standard"`__ [#]_ and adapt CSS stylesheets
in Docutils 1.0.
@@ -110,7 +129,7 @@
__ https://html.spec.whatwg.org/#the-blockquote-element
- - Change the default value of the initial_header_level_ setting to None
+ - Change the default value of the initial_header_level_ setting to "auto"
(<h2> if there is a document title, else <h1>) in Docutils 1.0.
- Remove option ``--embed-images`` (obsoleted by "image_loading_")
@@ -242,12 +261,6 @@
Misc
----
-* Prefer explicit reference names as base for an HTML element's ID
- in Docutils 1.0. No change for internal cross-references.
- Cf. `Sphinx issue #1961`__
-
- __ https://github.com/sphinx-doc/sphinx/issues/1961
-
* Revise the `String I/O`__ interface used by the `publish_string()`
and `publish_from_doctree()` publisher convenience functions.
(In Python 3, name and behaviour no longer match.)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-02 19:48:44
|
Revision: 10268
http://sourceforge.net/p/docutils/code/10268
Author: milde
Date: 2025-12-02 19:48:42 +0000 (Tue, 02 Dec 2025)
Log Message:
-----------
More detailled description of the restrictions on transition placement.
The formulation of the restrictions
"a transition may not begin a section or document" and
"a transition may not be at the end of a section or document"
is vague and inconsistent.
Add description of "invisible" elements that are ignored when determining
whether a transition is at the begin or end of a section or the document.
Modified Paths:
--------------
trunk/docutils/docs/ref/doctree.rst
Modified: trunk/docutils/docs/ref/doctree.rst
===================================================================
--- trunk/docutils/docs/ref/doctree.rst 2025-12-01 22:43:32 UTC (rev 10267)
+++ trunk/docutils/docs/ref/doctree.rst 2025-12-02 19:48:42 UTC (rev 10268)
@@ -4316,24 +4316,40 @@
:Processing: The <transition> element is typically rendered as vertical
whitespace (more than that separating paragraphs), with or
without a horizontal line or row of asterisks. In novels,
- transitions are often represented as a row of three
- well-spaced asterisks with vertical space above and below.
-:Parents: `\<document>`_, `\<section>`_
+ transitions are often represented as a row of three well-spaced
+ asterisks or a vignette with vertical space above and below.
+:Parents: `\<document>`_, `\<section>`_ (cf. `%structure.model`_)
:Children: none (empty)
:Attributes: only the `common attributes`_
-:Parameter Entities: `%structure.model`_ directly includes <transition>.
+:Parameter Entities: The `%structure.model`_ directly includes <transition>.
-A transition may not begin or end a section [#]_ or document, nor may two
-transitions be immediately adjacent.
+The document model sets additional restrictions
+on the placement of <transitions>: [#extra-rule]_
+* A transition may not be immediately adjacent to another transition,
+ i.e., <transition> elements must be separated by other elements.
+
+* A transition may not start the text of a document or section, i.e., a
+ <transition> is invalid as first child or preceded by only `\<title>`_,
+ `\<subtitle>`_, or invisible elements [#invisible-or-moving]_.
+
+* A transition may not occur at the end of a document or section. [#]_
+ In other words, a <transition> is invalid as last child element
+ or followed by only invisible elements [#invisible-or-moving]_.
+
See also `Doctree Representation of Transitions`__ in
`A Record of reStructuredText Syntax Alternatives`__.
-.. [#] In reStructuredText markup, a transition may appear to fall at
- the end of a section immediately before another section.
- A transform_ recognizes this case and moves the transition so it
- separates the sections.
+.. [#invisible-or-moving] The elements `\<meta>`_, `\<pending>`_,
+ `\<substitution_definition>`_, and `\<target>`_ are not visible
+ in the output document. The `\<decoration>`_ element contains
+ `\<header>`_ and `\<footer>`_ which move to the respective places.
+.. [#] In reStructuredText markup, a transition may appear to fall
+ at the end of a section immediately before another section.
+ The `misc.Transitions` transform_ recognizes this case and
+ moves the transition so it separates the sections.
+
__ ../dev/rst/alternatives.html#doctree-representation-of-transitions
__ ../dev/rst/alternatives.html
@@ -5610,25 +5626,15 @@
( (`%section.elements`_;),
(transition?, (`%section.elements`_;) )* )? )
-to impose the following restrictions:
+because there are additional restrictions on `\<transition>`_\ s.
+[#extra-rule]_
-* A `\<transition>`_ may not be the first element (i.e. it may
- not occur at the beginning of a document or directly after
- a title, subtitle, meta or decoration element).
-
-* Transitions must be separated by other elements (body elements,
- sections, etc.). In other words, a transition may not be
- immediately adjacent to another transition.
-
-An additional restriction cannot be easily expressed in the
-language of DTDs: [#]_
-
-* A transition may not occur at the end of a document or section.
-
The ``%structure.model`` parameter entity is directly employed in the
content models of the `\<document>`_ and `\<section>`_ elements.
-.. [#] Docutils enforces it in the `misc.Transitions` transform_.
+.. [#extra-rule] The restrictions cannot be fully expressed in the
+ language of DTDs without making the definition overly complicated.
+ Docutils checks them in the `misc.Transitions` transform_.
``%tbl.entry.mdl``
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-12-01 22:43:35
|
Revision: 10267
http://sourceforge.net/p/docutils/code/10267
Author: milde
Date: 2025-12-01 22:43:32 +0000 (Mon, 01 Dec 2025)
Log Message:
-----------
docutils.io.FileInput: ensure read() returns a `str`.
Decode data read from a file-like object, if it is a `bytes` instance.
Fixes bug #514
Modified Paths:
--------------
trunk/docutils/docs/api/publisher.rst
trunk/docutils/docutils/core.py
trunk/docutils/docutils/io.py
Modified: trunk/docutils/docs/api/publisher.rst
===================================================================
--- trunk/docutils/docs/api/publisher.rst 2025-11-28 13:52:09 UTC (rev 10266)
+++ trunk/docutils/docs/api/publisher.rst 2025-12-01 22:43:32 UTC (rev 10267)
@@ -525,9 +525,9 @@
A file-like object holding the document source
(must have `read()` and `close()` methods).
- Default: None (open `source_path <source_path (file I/O)_>`__
- or use `sys.stdin`).
+ Default: None (open `source_path`__ or use `sys.stdin`).
+ __
.. _source_path (file I/O):
source_path : str | pathlib.Path
@@ -534,7 +534,7 @@
Path to the source file,
opened if `source <source (file I/O)_>`__ is None.
- Default: None (use `source <source (file I/O)_>`__).
+ Default: None (use `source <source (file I/O)_>`__ or `sys.stdin`).
_`destination` : file-like
A file-like object that will receive the output document
@@ -548,7 +548,7 @@
destination_path : str | pathlib.Path
Path to the destination file, opened if destination_ is None.
- Default: None (use destination_).
+ Default: None (use destination_ or `sys.stdout`).
.. _string input:
@@ -594,6 +594,7 @@
Default: None.
+
Component Specification
-----------------------
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2025-11-28 13:52:09 UTC (rev 10266)
+++ trunk/docutils/docutils/core.py 2025-12-01 22:43:32 UTC (rev 10267)
@@ -719,7 +719,7 @@
- `io.FileInput`: Path to the input file, opened if no `source`
supplied.
- - `io.StringInput`: Optional. Path to the file or name of the
+ - `io.StringInput`: Optional. Path to the file or description of the
object that produced `source`. Only used for diagnostic output.
* `destination_class` **required**: The class for dynamically created
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2025-11-28 13:52:09 UTC (rev 10266)
+++ trunk/docutils/docutils/io.py 2025-12-01 22:43:32 UTC (rev 10267)
@@ -141,15 +141,13 @@
Provisional: encoding detection will be removed in Docutils 1.0.
"""
- if self.encoding and self.encoding.lower() == 'unicode':
- assert isinstance(data, str), ('input encoding is "unicode" '
- 'but `data` is no `str` instance')
if isinstance(data, str):
- # nothing to decode
- return data
+ return data # nothing to decode
if self.encoding:
# We believe the user/application when the encoding is
# explicitly given.
+ assert self.encoding.lower() != 'unicode', (
+ 'input encoding is "unicode" but `data` is no `str` instance')
encoding_candidates = [self.encoding]
else:
with warnings.catch_warnings():
@@ -419,15 +417,15 @@
) -> None:
"""
:Parameters:
- - `source`: either a file-like object (which is read directly), or
- `None` (which implies `sys.stdin` if no `source_path` given).
- - `source_path`: a path to a file, which is opened for reading.
- - `encoding`: the expected text encoding of the input file.
+ - `source`: either a file-like object (with `read()` and `close()`
+ methods) or None (use source indicated by `source_path`).
+ - `source_path`: a path to a file (which is opened for reading
+ if `source` is None) or `None` (implies `sys.stdin`).
+ - `encoding`: the text encoding of the input file.
- `error_handler`: the encoding error handler to use.
- `autoclose`: close automatically after read (except when
- `sys.stdin` is the source).
- - `mode`: how the file is to be opened (see standard function
- `open`). The default is read only ('r').
+ the source is `sys.stdin`).
+ - `mode`: how the file is to be opened. Default is read only ('r').
"""
super().__init__(source, source_path, encoding, error_handler)
self.autoclose = autoclose
@@ -467,7 +465,7 @@
# normalize newlines
data = '\n'.join(data.splitlines()+[''])
else:
- data = self.source.read()
+ data = self.decode(self.source.read())
finally:
if self.autoclose:
self.close()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-11-28 13:52:12
|
Revision: 10266
http://sourceforge.net/p/docutils/code/10266
Author: milde
Date: 2025-11-28 13:52:09 +0000 (Fri, 28 Nov 2025)
Log Message:
-----------
Documentation update and fixes.
Announce upcoming changes.
The "raw" directive can be used in substitution definitions.
Hide documentation for deprecated "line-block" directive in a
details/disclosure list.
Small edits for improved clarity.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docs/ref/doctree.rst
trunk/docutils/docs/ref/rst/directives.rst
trunk/docutils/docs/ref/rst/restructuredtext.rst
trunk/docutils/docs/user/config.rst
trunk/docutils/docs/user/rst/demo.rst
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/RELEASE-NOTES.rst 2025-11-28 13:52:09 UTC (rev 10266)
@@ -56,9 +56,6 @@
* The <footnote> element's first child (<label>) will become mandatory
in Docutils 1.0.
-* The "rst" parser will warn if a `"figure"`_ directive is missing both
- caption and legend in Docutils 1.0.
-
* Inline `\<target>`_ elements and <target> elements with content will be
deprecated in Docutils 1.0 and invalid in Docutils 2.0.
The "rst" parser will use <inline> elements for inline targets
@@ -74,6 +71,15 @@
The rST parser will handle a `doctest block`_ similar to a "code" directive
with language "pycon" (Python console) and generate a <literal_block>.
+Parsers
+-------
+
+* The "rst" parser will warn, if a directive that does not take arguments
+ has content above and below directive options in Docutils 0.23.
+
+* The "rst" parser will warn if a `"figure"`_ directive is missing both
+ caption and legend in Docutils 1.0.
+
Writers
-------
@@ -93,6 +99,11 @@
* "html5" writer:
+ - If a section title has several IDs, use the last one (from the first
+ `explicit target`__) as self-link_ in Docutils 0.23.
+
+ __ docs/ref/rst/restructuredtext.html#explicit-hyperlink-targets
+
- Move attribution behind the blockquote to comply with the
`"HTML living standard"`__ [#]_ and adapt CSS stylesheets
in Docutils 1.0.
@@ -107,8 +118,9 @@
* "latex2e" writer:
- - Only write ``\label`` commands for IDs that are referenced in the
- current document in Docutils 0.23.
+ - Only write ``\label`` commands for explicit IDs and IDs that are
+ referenced in the current document (i.e. not for un-referenced
+ section titles) in Docutils 0.23.
- Change default of use_latex_citations_ setting to True
in Docutils 1.0.
@@ -1560,6 +1572,7 @@
.. _output_path: docs/user/config.html#output-path
.. _reference_label: docs/user/config.html#reference-label
.. _root_prefix: docs/user/config.html#root-prefix
+.. _self-link: docs/user/config.html#section-self-link
.. _SmartQuotes: docs/user/config.html#smart-quotes
.. _sources: docs/user/config.html#sources
.. _use_latex_citations: docs/user/config.html#use-latex-citations
Modified: trunk/docutils/docs/ref/doctree.rst
===================================================================
--- trunk/docutils/docs/ref/doctree.rst 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/docs/ref/doctree.rst 2025-11-28 13:52:09 UTC (rev 10266)
@@ -3854,8 +3854,9 @@
:Children: one or more `body elements`_
:Attributes: backrefs_, level_, line_, type_, and the `common attributes`_.
-In Docutils, the generation of system messages can be configured with the
-`"report_level"`_ setting.
+In Docutils, system messages with a level lower than the
+`"report_level"`_ setting are removed by the `universal.FilterMessages`
+transform_.
Examples
--------
@@ -4249,8 +4250,9 @@
:Category: `Structural Elements`_
-:Analogues: <topic> is analogous to the DocBook_ <simplesect> element
- and the HTML_ <aside> element.
+:Analogues: <topic> is analogous to the HTML_ <aside> element.
+ The DocBook_ <simplesect> element is similar, but you cannot
+ place `body elements`_ after a <simplesect>.
:Processing: A <topic> element should be set off from the rest of the
document somehow, such as with indentation or a border.
@@ -5794,7 +5796,7 @@
.. _namespace:
Almost all elements in a document share a common *namespace*
- for reference names, comparison ignores case.
+ for reference names and match them ignoring case.
Only `\<substitution_definition>`_ and `\<substitution_reference>`_
elements use a distinct namespace with `case-sensitive but forgiving`_
matching of reference names.
Modified: trunk/docutils/docs/ref/rst/directives.rst
===================================================================
--- trunk/docutils/docs/ref/rst/directives.rst 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/docs/ref/rst/directives.rst 2025-11-28 13:52:09 UTC (rev 10266)
@@ -453,8 +453,8 @@
A topic is like a block quote with a title, or a self-contained
section with no subsections. Use the "topic" directive to indicate a
self-contained idea that is separate from the flow of the document.
-Topics may occur anywhere a section or transition may occur and
-in sidebars. Body elements and topics may not contain nested topics.
+Topics may be nested in the document, a section, or a
+sidebar_. Body elements and topics may not contain topics.
The directive's sole argument is interpreted as the topic title; the
next line must be blank. All subsequent lines make up the topic body,
@@ -511,13 +511,6 @@
Line Block
==========
-.. admonition:: Deprecated
-
- The "line-block" directive is deprecated. Use the `line block
- syntax`_ instead.
-
- .. _line block syntax: restructuredtext.html#line-blocks
-
.. class:: field-indent-13em
:Directive Type: "line-block"
@@ -526,28 +519,31 @@
:Directive Options: `class <class option_>`_, name_
:Directive Content: Becomes the body of the line block.
-The "line-block" directive constructs an element where line breaks and
-initial indentation is significant and inline markup is supported. It
-is equivalent to a `parsed literal block`_ with different rendering:
-typically in an ordinary serif typeface instead of a
-typewriter/monospaced face, and not automatically indented. (Have the
-line-block directive begin a block quote to get an indented line
-block.) Line blocks are useful for address blocks and verse (poetry,
-song lyrics), where the structure of lines is significant. For
-example, here's a classic::
+.. class:: details
- "To Ma Own Beloved Lassie: A Poem on her 17th Birthday", by
- Ewan McTeagle (for Lassie O'Shea):
+**Deprecated.** Use the `line block syntax`_ instead.
+ The "line-block" directive constructs an element where line breaks and
+ initial indentation is significant and inline markup is supported. It
+ is comparable to a `parsed literal block`_ with different rendering:
+ typically in an ordinary serif typeface instead of a
+ typewriter/monospaced face, and not automatically indented. (Have the
+ line-block directive begin a block quote to get an indented line
+ block.) Line blocks are useful for address blocks and verse (poetry,
+ song lyrics), where the structure of lines is significant. For
+ example, here's a classic::
- .. line-block::
+ "To Ma Own Beloved Lassie: A Poem on her 17th Birthday", by
+ Ewan McTeagle (for Lassie O'Shea):
- Lend us a couple of bob till Thursday.
- I'm absolutely skint.
- But I'm expecting a postal order and I can pay you back
- as soon as it comes.
- Love, Ewan.
+ .. line-block::
+ Lend us a couple of bob till Thursday.
+ I'm absolutely skint.
+ But I'm expecting a postal order and I can pay you back
+ as soon as it comes.
+ Love, Ewan.
+
.. _parsed-literal:
Parsed Literal Block
@@ -1171,9 +1167,9 @@
:Directive Content: none
:Configuration Settings: toc_backlinks_, use_latex_toc_, generate_oowriter_toc_
-The "contents" directive generates a table of contents (TOC) in
+The "contents" directive generates a table of contents (ToC) in
a `\<topic>`_ element. Topics, and therefore tables of contents,
-may occur anywhere a section or transition may occur and in sidebars.
+may be nested in the document, a section, or a sidebar_.
Body elements and topics may not contain tables of contents.
Here's the directive in its simplest form::
@@ -1284,6 +1280,8 @@
Document Header & Footer
========================
+.. class:: field-indent-13em
+
:Directive Types: "header" and "footer"
:Doctree Elements: `\<decoration>`_, `\<header>`_, `\<footer>`_
:Directive Arguments: none
@@ -1411,18 +1409,13 @@
Directives for Substitution Definitions
-----------------------------------------
-The directives introduced in this section may be used in
-`substitution definitions`_. They may not be used directly,
-in standalone context (except for the image_ directive).
+This section lists directives that may be used in `substitution definitions`_.
-.. _substitution definitions:
-.. _substitution definition: restructuredtext.html#substitution-definitions
-
Inline Images
=============
-The `image`_ directive can be used both, stand-alone (to define
+The "`image`_" directive can be used both, stand-alone (to define
block-level images) and in substitution definitions to define
inline images. [#no-inline-name]_
@@ -1430,6 +1423,15 @@
a substitution definition. [#substitution-limits]_
+Inline Raw
+==========
+
+The "raw_" directive can be used stand-alone and in substitution definitions.
+
+"Raw data pass-through" in inline context is also possible with
+a `custom role`_ derived from the `"raw" role`_.
+
+
.. _replace:
Replacement Text
@@ -1464,10 +1466,11 @@
.. |Python| replace:: Python, *the* best language around
.. _Python: https://www.python.org/
-.. [#substitution-limits] As a substitution may be referenced more than
- one time, a substitution definition may not contain references to
- `anonymous hyperlinks`_, `auto-numbered`_ or `auto-symbol`_ footnotes
- and no `hyperlink targets`__ (names and identifiers must be unique).
+.. [#substitution-limits]
+ A substitution definition may not contain references to `anonymous
+ hyperlinks`_, `auto-numbered`_ or `auto-symbol`_ footnotes and no
+ `hyperlink targets`__ because a substitution may be referenced more
+ than once but names and identifiers must be unique.
__ restructuredtext.html#inline-internal-targets
@@ -1768,6 +1771,8 @@
Inline equivalents of the "raw" directive can be defined via
`custom interpreted text roles`_ derived from the `"raw" role`_.
+The "raw" directive can also be used directly in a `substitution
+definition`_.
.. _raw options:
@@ -1788,8 +1793,8 @@
.. _class directive:
.. _rst-class:
-Class
-=====
+Setting Class Attributes
+========================
.. class:: field-indent-13em
@@ -1949,6 +1954,7 @@
.. _role:
+.. _custom role:
Custom Interpreted Text Roles
=============================
@@ -2342,10 +2348,13 @@
.. _hyperlink references: restructuredtext.html#hyperlink-references
.. _hyperlink targets:
.. _hyperlink target: restructuredtext.html#hyperlink-targets
+.. _line block syntax: restructuredtext.html#line-blocks
.. _reference name:
.. _reference names: restructuredtext.html#reference-names
.. _section title style hierarchy: restructuredtext.html#title-styles
.. _simple table: restructuredtext.html#simple-tables
+.. _substitution definitions:
+.. _substitution definition: restructuredtext.html#substitution-definitions
.. _supported length units: restructuredtext.html#length-units
.. _reStructuredText Interpreted Text Roles:
Modified: trunk/docutils/docs/ref/rst/restructuredtext.rst
===================================================================
--- trunk/docutils/docs/ref/rst/restructuredtext.rst 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/docs/ref/rst/restructuredtext.rst 2025-11-28 13:52:09 UTC (rev 10266)
@@ -88,7 +88,7 @@
1. This is an enumerated list.
- 2. Enumerators may be arabic numbers, letters, or roman
+ 2. Enumerators may be arabic numerals, letters, or roman
numerals.
3. `Definition lists`_::
@@ -204,7 +204,7 @@
- Comments_::
- .. Comments begin with two dots and a space. Anything may
+ .. Comments begin with two dots and whitespace. Anything may
follow, except for the syntax of footnotes/citations,
hyperlink targets, directives, or substitution definitions.
@@ -359,7 +359,7 @@
itself. (A literal backslash can be specified by two backslashes in a
row -- the first backslash escapes the second. [#caveat]_)
-* Escaped whitespace characters are removed from the output document
+* _`Escaped whitespace` characters are removed from the output document
together with the escaping backslash. This allows for `character-level
inline markup`_.
@@ -743,7 +743,7 @@
Enumerated lists (a.k.a. "ordered" lists) are similar to bullet lists,
but use enumerators instead of bullets. An enumerator consists of an
enumeration sequence member and formatting, followed by whitespace.
-The following enumeration sequences are recognized:
+The following *enumeration sequences* are recognized:
- arabic numerals: 1, 2, 3, ... (no upper limit).
- uppercase alphabet characters: A, B, C, ..., Z.
@@ -753,10 +753,10 @@
In addition, the auto-enumerator, ``#``, may be used to automatically
enumerate a list. Auto-enumerated lists may begin with explicit
-enumeration, which sets the sequence. Fully auto-enumerated lists use
-arabic numerals and begin with 1.
+enumeration, which sets the sequence and start value.
+Fully auto-enumerated lists use arabic numerals and begin with 1.
-The following formatting types are recognized:
+The following *formatting types* are recognized:
- suffixed with a period: ``1.``, ``A.``, ``a.``, ``I.``, ``i.``.
- surrounded by parentheses: ``(1)``, ``(A)``, ``(a)``, ``(I)``, ``(i)``.
@@ -1377,7 +1377,7 @@
-- Sherlock Holmes
-A block quote may end with an attribution: a text block beginning with
+A block quote may end with an _`attribution`: a paragraph beginning with
``--``, ``---``, or a true em-dash, flush left within the block quote. If
the attribution consists of multiple lines, the left edges of the
second and subsequent lines must align.
@@ -2299,9 +2299,14 @@
The following *inline-compatible directives* are implemented in Docutils:
+:`"date"`_: inserts the current local date.
+
:`"image"`_: can be used for block-level images as well as in a
substitution definition for `inline images`_.
+:`"raw"`_: can be used in block-level context as well as in a
+ substitution definition.
+
:`"replace"`_: allows simple macro substitution.
It also provides a workaround__ for the still missing support of
nested inline markup.
@@ -2310,8 +2315,6 @@
:`"unicode"`_: converts Unicode character codes to characters.
-:`"date"`_: inserts the current local date.
-
Applications may find other use cases for the substitution mechanism.
The following are ideas that have not been implemented in Docutils.
Modified: trunk/docutils/docs/user/config.rst
===================================================================
--- trunk/docutils/docs/user/config.rst 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/docs/user/config.rst 2025-11-28 13:52:09 UTC (rev 10266)
@@ -1521,8 +1521,8 @@
section_self_link
"""""""""""""""""
-Append an empty anchor element with a ``href`` to the section to
-section headings. See ``responsive.css`` for an example how this can be
+Extend section headings with an empty <a> element with a ``href`` to
+the section. See ``responsive.css`` for an example how this can be
styled to show a symbol allowing users to copy the section's URL.
:Default: False.
Modified: trunk/docutils/docs/user/rst/demo.rst
===================================================================
--- trunk/docutils/docs/user/rst/demo.rst 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/docs/user/rst/demo.rst 2025-11-28 13:52:09 UTC (rev 10266)
@@ -546,7 +546,7 @@
Here's one:
-.. Comments begin with two dots and a space. Anything may
+.. Comments begin with two dots and whitespace. Anything may
follow, except for the syntax of footnotes, hyperlink
targets, directives, or substitution definitions.
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2025-11-28 13:52:09 UTC (rev 10266)
@@ -388,6 +388,8 @@
def section_title_tags(self, node):
start_tag, close_tag = super().section_title_tags(node)
ids = node.parent['ids']
+ # TODO: use ``ids[-1]``
+ # (IDs from explicit targets are appended to the implicit ID)
if (ids and getattr(self.settings, 'section_self_link', None)
and not isinstance(node.parent, nodes.document)):
self_link = ('<a class="self-link" title="link to this section"'
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2025-11-28 13:51:57 UTC (rev 10265)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2025-11-28 13:52:09 UTC (rev 10266)
@@ -2600,23 +2600,21 @@
self.depart_inline(node)
self.out.append('}')
- # Literal blocks are used for '::'-prefixed literal-indented
- # blocks of text, where the inline markup is not recognized,
- # but are also the product of the "parsed-literal" directive,
- # where the markup is respected.
+ # <literal_block> elements are used
+ # for literal blocks (where content is not parsed),
+ # for the "code" directive (where content may be parsed by Pygments), and
+ # for the "parsed-literal" directive (where rST inline markup is parsed).
#
- # In both cases, we want to use a typewriter/monospaced typeface.
- # For "real" literal-blocks, we can use \verbatim, while for all
- # the others we must use \ttfamily and \raggedright.
+ # In all cases, we want to use a monospaced typeface.
+ # If the <literal_block> contains only text, we can use a "verbatim-like"
+ # environment, for mixed content we must use \ttfamily and \raggedright.
#
- # We can distinguish between the two kinds by the number of
- # siblings that compose this node: if it is composed by a
- # single element, it's either
- # * a real one,
- # * a parsed-literal that does not contain any markup, or
- # * a parsed-literal containing just one markup construct.
+ # We can distinguish between the use cases looking at the element's
+ # children: if there is a single <Text> child, it is either
+ # * a "real" literal block or
+ # * a parsed-literal that does not contain any markup.
def is_plaintext(self, node):
- """Check whether a node can be typeset verbatim"""
+ """Check whether `node` contains only text"""
return (len(node) == 1) and isinstance(node[0], nodes.Text)
def visit_literal_block(self, node) -> None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2025-11-28 13:51:59
|
Revision: 10265
http://sourceforge.net/p/docutils/code/10265
Author: milde
Date: 2025-11-28 13:51:57 +0000 (Fri, 28 Nov 2025)
Log Message:
-----------
Simplify `ClassAttribute` transform.
Use `node.findall()` instead of a re-implementation to find the
right element to attach the class attribute to.
No change to functionality.
Modified Paths:
--------------
trunk/docutils/docutils/transforms/misc.py
Modified: trunk/docutils/docutils/transforms/misc.py
===================================================================
--- trunk/docutils/docutils/transforms/misc.py 2025-11-28 13:51:41 UTC (rev 10264)
+++ trunk/docutils/docutils/transforms/misc.py 2025-11-28 13:51:57 UTC (rev 10265)
@@ -45,22 +45,14 @@
def apply(self) -> None:
pending = self.startnode
- parent = pending.parent
- child = pending
- while parent:
- # Check for appropriate following siblings:
- for index in range(parent.index(child) + 1, len(parent)):
- element = parent[index]
- if (isinstance(element, nodes.Invisible)
- or isinstance(element, nodes.system_message)):
- continue
- element['classes'] += pending.details['class']
- pending.parent.remove(pending)
- return
- else:
- # At end of section or container; apply to sibling
- child = parent
- parent = parent.parent
+ for element in pending.findall(include_self=False, descend=False,
+ siblings=True, ascend=True):
+ if isinstance(element, (nodes.Invisible, nodes.system_message)):
+ continue
+ element['classes'] += pending.details['class']
+ pending.parent.remove(pending)
+ return
+
error = self.document.reporter.error(
'No suitable element following "%s" directive'
% pending.details['directive'],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|