[Lldb-commits] [lldb] [lldb][man][nfc] Don't register a markdown parser when building man packages (PR #98420)

Alan Zhao via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 10 17:31:01 PDT 2024


https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/98420

>From fab10fb2efe8265d1b403a650dbd2d3348f29b73 Mon Sep 17 00:00:00 2001
From: Alan Zhao <ayzhao at google.com>
Date: Wed, 10 Jul 2024 15:56:39 -0700
Subject: [PATCH 1/2] [lldb][man][nfc] Don't register a markdown parser when
 building man pages

This reduces Sphinx dependencies for building lldb man pages as lldb man
pages don't use markdown.
---
 lldb/docs/conf.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index 27a1cd7c3c31a..805a6dc19ac81 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -89,9 +89,13 @@
 # The suffix of source filenames.
 source_suffix = {
     ".rst": "restructuredtext",
-    ".md": "markdown",
 }
 
+# Man pages do not use markdown pages, so we don't need to register a markdown
+# parser.
+if not building_man_page:
+  source_suffix[".md"] = "markdown"
+
 # The encoding of source files.
 # source_encoding = 'utf-8-sig'
 

>From f89c189303a4a22e9087b190612b7d483238b703 Mon Sep 17 00:00:00 2001
From: Alan Zhao <ayzhao at google.com>
Date: Wed, 10 Jul 2024 17:30:44 -0700
Subject: [PATCH 2/2] fix formatting

---
 lldb/docs/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index 805a6dc19ac81..233cdf7501934 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -94,7 +94,7 @@
 # Man pages do not use markdown pages, so we don't need to register a markdown
 # parser.
 if not building_man_page:
-  source_suffix[".md"] = "markdown"
+    source_suffix[".md"] = "markdown"
 
 # The encoding of source files.
 # source_encoding = 'utf-8-sig'



More information about the lldb-commits mailing list