|
From: <mi...@us...> - 2026-06-23 14:59:15
|
Revision: 10369
http://sourceforge.net/p/docutils/code/10369
Author: milde
Date: 2026-06-23 14:59:13 +0000 (Tue, 23 Jun 2026)
Log Message:
-----------
Ignore the "match_titles" argument of `RSTState.nested_list_parse()`.
The rST parser function `parsers.rst.states.RSTState.nested_list_parse()`
is used to parse the content of lists and list-like constructs where
section titles are generally not allowed.
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/RELEASE-NOTES.rst
trunk/docutils/docutils/parsers/rst/states.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-06-23 14:59:05 UTC (rev 10368)
+++ trunk/docutils/HISTORY.rst 2026-06-23 14:59:13 UTC (rev 10369)
@@ -78,8 +78,9 @@
- Do not add "name" attribute to `<reference>` elements
nor set the internal attribute `indirect_reference_name`.
- - Report INFO message, if a directive that does not take
+ - Generate INFO message, if a directive that does not take
arguments has content above and below directive options.
+ - Ignore the "match_titles" argument of `RSTState.nested_list_parse()`.
* docutils/readers/standalone.py
Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst 2026-06-23 14:59:05 UTC (rev 10368)
+++ trunk/docutils/RELEASE-NOTES.rst 2026-06-23 14:59:13 UTC (rev 10369)
@@ -184,9 +184,9 @@
* Remove `parsers.rst.states.Struct` (obsoleted by `types.SimpleNamespace`)
in Docutils 2.0.
-* Ignore the "match_titles" argument of
- `parsers.rst.states.RSTState.nested_list_parse()` in Docutils 1.0;
- remove it in Docutils 2.0.
+* Remove the "match_titles" argument of
+ `parsers.rst.states.RSTState.nested_list_parse()` (ignored since
+ Docutils 1.0.) in Docutils 2.0.
* Remove `frontend.OptionParser`, `frontend.Option`, `frontend.Values`,
`frontend.store_multiple()`, and `frontend.read_config_file()` when
Modified: trunk/docutils/docutils/parsers/rst/states.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/states.py 2026-06-23 14:59:05 UTC (rev 10368)
+++ trunk/docutils/docutils/parsers/rst/states.py 2026-06-23 14:59:13 UTC (rev 10369)
@@ -383,7 +383,7 @@
blank_finish,
blank_finish_state=None,
extra_settings={},
- match_titles=False, # deprecated, will be removed
+ match_titles=None, # deprecated, will be removed
state_machine_class=None,
state_machine_kwargs=None):
"""
@@ -397,11 +397,10 @@
Return new offset and a boolean indicating whether there was a
blank final line.
"""
- if match_titles:
+ if match_titles is not None:
warnings.warn('The "match_titles" argument of '
'parsers.rst.states.RSTState.nested_list_parse() '
- 'will be ignored in Docutils 1.0 '
- 'and removed in Docutils 2.0.',
+ 'is ignored and will be removed in Docutils 2.0.',
PendingDeprecationWarning, stacklevel=2)
if state_machine_class is None:
state_machine_class = self.nested_sm
@@ -417,8 +416,7 @@
my_state_machine.states[blank_finish_state].blank_finish = blank_finish
for key, value in extra_settings.items():
setattr(my_state_machine.states[initial_state], key, value)
- my_state_machine.run(block, input_offset, memo=self.memo,
- node=node, match_titles=match_titles)
+ my_state_machine.run(block, input_offset, memo=self.memo, node=node)
blank_finish = my_state_machine.states[blank_finish_state].blank_finish
my_state_machine.unlink()
return my_state_machine.abs_line_offset(), blank_finish
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|