[Lldb-commits] [lldb] d03b04f - [lldb] [docs] Remove obsolete recommonmark use

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 27 04:45:30 PDT 2021


Author: Michał Górny
Date: 2021-10-27T13:45:05+02:00
New Revision: d03b04f211e73c2f59ba5dc6a6a8c777de001ad6

URL: https://github.com/llvm/llvm-project/commit/d03b04f211e73c2f59ba5dc6a6a8c777de001ad6
DIFF: https://github.com/llvm/llvm-project/commit/d03b04f211e73c2f59ba5dc6a6a8c777de001ad6.diff

LOG: [lldb] [docs] Remove obsolete recommonmark use

The recommonmark package is no longer required since all the documents
have been converted to .rst.  Remove the related support code from
docs/conf.py.

Differential Revision: https://reviews.llvm.org/D112612

Added: 
    

Modified: 
    lldb/docs/conf.py

Removed: 
    


################################################################################
diff  --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index 0c3cd59fc11ef..cf3af568572b6 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -61,21 +61,6 @@
     '.rst': 'restructuredtext',
 }
 
-try:
-  import recommonmark
-except ImportError:
-  # manpages do not use any .md sources
-  if not building_man_page:
-    raise
-else:
-  import sphinx
-  if sphinx.version_info >= (3, 0):
-    # This requires 0.5 or later.
-    extensions.append('recommonmark')
-  else:
-    source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
-  source_suffix['.md'] = 'markdown'
-
 # The encoding of source files.
 #source_encoding = 'utf-8-sig'
 
@@ -285,20 +270,6 @@
 # If true, show URL addresses after external links.
 #man_show_urls = False
 
-def process_md(name):
-    file_subpath = os.path.join(command_guide_subpath, name)
-    with open(os.path.join(command_guide_path, name)) as f:
-        title = f.readline().rstrip('\n')
-
-        m = re.match(r'^# (\S+) - (.+)$', title)
-        if m is None:
-            print("error: invalid title in %r "
-                  "(expected '# <name> - <description>')" % file_subpath,
-                  file=sys.stderr)
-        else:
-            man_pages.append((file_subpath.replace('.md',''), m.group(1),
-                              m.group(2), man_page_authors, 1))
-
 # -- Options for Texinfo output ------------------------------------------------
 
 # Grouping the document tree into Texinfo files. List of tuples


        


More information about the lldb-commits mailing list