From d03b04f211e73c2f59ba5dc6a6a8c777de001ad6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 27 Oct 2021 13:31:35 +0200 Subject: [PATCH] [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 --- lldb/docs/conf.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/lldb/docs/conf.py b/lldb/docs/conf.py index 0c3cd59..cf3af56 100644 --- a/lldb/docs/conf.py +++ b/lldb/docs/conf.py @@ -61,21 +61,6 @@ source_suffix = { '.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 @@ man_pages = [('man/lldb', 'lldb', u'LLDB Documentation', [u'LLVM project'], 1), # 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 '# - ')" % 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 -- 2.7.4