diff --git a/docs/tabs.md b/docs/tabs.md index 66668a0..8f7da1b 100644 --- a/docs/tabs.md +++ b/docs/tabs.md @@ -186,6 +186,24 @@ Ending paragraph :::::: +Tab set, within tab set: + +::::::{tab-set} +:::::{tab-item} Label 1 +::::{tab-set} +:::{tab-item} Label 1a +Content 1a +::: +:::{tab-item} Label 1b +Content 1b +::: +:::: +::::: +:::::{tab-item} Label 2 +Content 2 +::::: +:::::: + ## `tab-set` options class diff --git a/sphinx_design/dropdown.py b/sphinx_design/dropdown.py index c5acf4c..c702474 100644 --- a/sphinx_design/dropdown.py +++ b/sphinx_design/dropdown.py @@ -148,7 +148,7 @@ class DropdownHtmlTransform(SphinxPostTransform): def run(self): """Run the transform""" document: nodes.document = self.document - for node in document.traverse(lambda node: is_component(node, "dropdown")): + for node in findall(document)(lambda node: is_component(node, "dropdown")): # TODO option to not have card css (but requires more formatting) use_card = True diff --git a/sphinx_design/tabs.py b/sphinx_design/tabs.py index d280eef..a114170 100644 --- a/sphinx_design/tabs.py +++ b/sphinx_design/tabs.py @@ -7,6 +7,7 @@ from sphinx.util.docutils import SphinxDirective from sphinx.util.logging import getLogger +from ._compat import findall from .shared import WARNING_TYPE, create_component, is_component LOGGER = getLogger(__name__) @@ -216,7 +217,7 @@ def run(self) -> None: tab_item_id_base = "sd-tab-item-" tab_item_id_num = 0 - for tab_set in self.document.traverse( + for tab_set in findall(self.document)( lambda node: is_component(node, "tab-set") ): tab_set_identity = tab_set_id_base + str(tab_set_id_num)