Skip to content

Commit f8dbc08

Browse files
authored
🔧 MAINTAIN: Fix docutils PendingDeprecationWarning (#94)
1 parent 9a78da6 commit f8dbc08

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

docs/tabs.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,24 @@ Ending paragraph
186186

187187
::::::
188188

189+
Tab set, within tab set:
190+
191+
::::::{tab-set}
192+
:::::{tab-item} Label 1
193+
::::{tab-set}
194+
:::{tab-item} Label 1a
195+
Content 1a
196+
:::
197+
:::{tab-item} Label 1b
198+
Content 1b
199+
:::
200+
::::
201+
:::::
202+
:::::{tab-item} Label 2
203+
Content 2
204+
:::::
205+
::::::
206+
189207
## `tab-set` options
190208

191209
class

sphinx_design/dropdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class DropdownHtmlTransform(SphinxPostTransform):
148148
def run(self):
149149
"""Run the transform"""
150150
document: nodes.document = self.document
151-
for node in document.traverse(lambda node: is_component(node, "dropdown")):
151+
for node in findall(document)(lambda node: is_component(node, "dropdown")):
152152

153153
# TODO option to not have card css (but requires more formatting)
154154
use_card = True

sphinx_design/tabs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from sphinx.util.docutils import SphinxDirective
88
from sphinx.util.logging import getLogger
99

10+
from ._compat import findall
1011
from .shared import WARNING_TYPE, create_component, is_component
1112

1213
LOGGER = getLogger(__name__)
@@ -216,7 +217,7 @@ def run(self) -> None:
216217
tab_item_id_base = "sd-tab-item-"
217218
tab_item_id_num = 0
218219

219-
for tab_set in self.document.traverse(
220+
for tab_set in findall(self.document)(
220221
lambda node: is_component(node, "tab-set")
221222
):
222223
tab_set_identity = tab_set_id_base + str(tab_set_id_num)

0 commit comments

Comments
 (0)