[Lldb-commits] [lldb] [llvm] [Docs] Use cacheable myst_heading_slug_func value (PR #104847)
Scott Linder via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 19 13:09:11 PDT 2024
https://github.com/slinder1 created https://github.com/llvm/llvm-project/pull/104847
Avoid creating an uncacheable conf variable by using a string instead of
a function reference. Also has the effect of avoiding triggering the
"config.cache" sphinx warning.
Requires myst_parser 0.19.0 (specifically
https://github.com/executablebooks/MyST-Parser/pull/696) which is over a
year old by now. Do we mandate any minimum version for these
dependencies?
>From 27adbd2a1b495b66147245b31359eae03ebeabb1 Mon Sep 17 00:00:00 2001
From: Scott Linder <Scott.Linder at amd.com>
Date: Mon, 19 Aug 2024 20:01:41 +0000
Subject: [PATCH] [Docs] Use cacheable myst_heading_slug_func value
Avoid creating an uncacheable conf variable by using a string instead of
a function reference. Also has the effect of avoiding triggering the
"config.cache" sphinx warning.
Requires myst_parser 0.19.0 (specifically
https://github.com/executablebooks/MyST-Parser/pull/696) which is over a
year old by now. Do we mandate any minimum version for these
dependencies?
---
lldb/docs/conf.py | 4 +---
llvm/docs/conf.py | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index 50f4ab84f1ca66..79cc37c8c45578 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -57,10 +57,8 @@
raise
# Automatic anchors for markdown titles
-from llvm_slug import make_slug
-
myst_heading_anchors = 6
-myst_heading_slug_func = make_slug
+myst_heading_slug_func = "llvm_slug.make_slug"
autodoc_default_options = {"special-members": True}
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
index 7f2ed5309606b5..a40da828ae2a25 100644
--- a/llvm/docs/conf.py
+++ b/llvm/docs/conf.py
@@ -40,10 +40,8 @@
raise
# Automatic anchors for markdown titles
-from llvm_slug import make_slug
-
myst_heading_anchors = 6
-myst_heading_slug_func = make_slug
+myst_heading_slug_func = "llvm_slug.make_slug"
# Add any paths that contain templates here, relative to this directory.
More information about the lldb-commits
mailing list