SF.net SVN: docutils:[9696 ] trunk/docutils

milde--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 9696
          http://sourceforge.net/p/docutils/code/9696
Author:   milde
Date:     2024-05-08 10:32:41 +0000 (Wed, 08 May 2024)
Log Message:
-----------
Fix recommonmark parser support. Announce removal in Docutils 1.0.

Recommonmark is unmaintained since 2021 and deprecated in favour
of the `MyST parser`_.

Modified Paths:
--------------
    trunk/docutils/RELEASE-NOTES.txt
    trunk/docutils/docs/user/config.txt
    trunk/docutils/docutils/parsers/recommonmark_wrapper.py

Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt	2024-05-08 07:11:05 UTC (rev 9695)
+++ trunk/docutils/RELEASE-NOTES.txt	2024-05-08 10:32:41 UTC (rev 9696)
@@ -151,6 +151,13 @@
 * Remove `parsers.rst.directives.CSVTable.HeaderDialect`
   in Docutils 0.22.
 
+* Remove support for the `recommonmark parser`_ in Docutils 1.0.
+  Recommonmark is unmaintained since 2021 and deprecated in favour
+  of the `MyST parser`_.
+
+  .. _recommonmark parser: docs/user/config.html#recommonmark-parser
+  .. _MyST parser: docs/user/config.html#myst-parser
+
 * Remove the "rawsource" argument from `nodes.Text.__init__()`
   in Docutils 2.0.
 

Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt	2024-05-08 07:11:05 UTC (rev 9695)
+++ trunk/docutils/docs/user/config.txt	2024-05-08 10:32:41 UTC (rev 9696)
@@ -967,9 +967,10 @@
 [recommonmark parser]
 ---------------------
 
-.. admonition:: Provisional
+.. admonition:: Deprecated
 
    Depends on deprecated 3rd-party package recommonmark__.
+   Support will be removed in Docutils 1.0.
 
 Currently no configuration settings.
 

Modified: trunk/docutils/docutils/parsers/recommonmark_wrapper.py
===================================================================
--- trunk/docutils/docutils/parsers/recommonmark_wrapper.py	2024-05-08 07:11:05 UTC (rev 9695)
+++ trunk/docutils/docutils/parsers/recommonmark_wrapper.py	2024-05-08 10:32:41 UTC (rev 9696)
@@ -16,10 +16,10 @@
 
 __ https://pypi.org/project/recommonmark/
 
-.. important:: This module is provisional
+.. important:: This module is deprecated.
 
    * The "recommonmark" package is unmaintained and deprecated.
-     This wrapper module will be removed in a future Docutils version.
+     This wrapper module will be removed in Docutils 1.0.
 
    * The API is not settled and may change with any minor Docutils version.
 """
@@ -117,6 +117,11 @@
                 else:
                     i += 1
 
+        # remove empty Text nodes:
+        for node in document.findall(nodes.Text):
+            if not len(node):
+                node.parent.remove(node)
+
         # add "code" class argument to literal elements (inline and block)
         for node in document.findall(is_literal):
             if 'code' not in node['classes']:

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



_______________________________________________
Docutils-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.