diff --git a/src/rougail/output_doc/doc.py b/src/rougail/output_doc/doc.py
index 824815a02..9ec72fd11 100644
--- a/src/rougail/output_doc/doc.py
+++ b/src/rougail/output_doc/doc.py
@@ -117,9 +117,13 @@ class RougailOutputDoc(Examples, Changelog):
self.property_to_string = get_properties_to_string()
self.outputs = OutPuts().get()
self.dynamic_paths = {}
- config = self.config.unrestraint
- self.populate_dynamics(config=config)
- informations = self.parse_families(config)
+ if not self.config.isoptiondescription():
+ informations = {}
+ self.parse_variable(self.config, None, informations)
+ else:
+ config = self.config.unrestraint
+ self.populate_dynamics(config=config)
+ informations = self.parse_families(config)
if informations is None:
informations = {}
elif self.config.type() not in ['config', 'metaconfig', 'groupconfig', 'mixconfig']:
@@ -129,8 +133,9 @@ class RougailOutputDoc(Examples, Changelog):
for path in self.config.path().split('.'):
family = family.option(path)
name = family.name(uncalculated=True)
- infos[name] = self.get_root_family(family)
- infos = infos[name]["children"]
+ if family.isoptiondescription():
+ infos[name] = self.get_root_family(family)
+ infos = infos[name]["children"]
infos.update(informations)
informations = root_informations
self.informations = informations
diff --git a/tests/root_a_family.a_second_family.a_variable.adoc b/tests/root_a_family.a_second_family.a_variable.adoc
new file mode 100644
index 000000000..6bba74d69
--- /dev/null
+++ b/tests/root_a_family.a_second_family.a_variable.adoc
@@ -0,0 +1,22 @@
+== First family
+
+====
+**๐ Informations**
+
+**Path**: a_family
+====
+=== A second family
+
+====
+**๐ Informations**
+
+**Path**: a_family.a_second_family
+====
+[cols="1a,1a"]
+|====
+| Variable | Description
+| **a_family.a_second_family.a_variable** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[boolean]` `mandatory` | A boolean variable. +
+**Default**: true
+|====
+
diff --git a/tests/root_a_family.a_second_family.a_variable.gitlab.md b/tests/root_a_family.a_second_family.a_variable.gitlab.md
new file mode 100644
index 000000000..ab72679b6
--- /dev/null
+++ b/tests/root_a_family.a_second_family.a_variable.gitlab.md
@@ -0,0 +1,18 @@
+First family
+
+> [!note] ๐ Informations
+> **Path**: a_family
+
+A second family
+
+> [!note] ๐ Informations
+> **Path**: a_family.a_second_family
+
+| Variable | Description |
+|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
+| **a_family.a_second_family.a_variable**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | A boolean variable.
**Default**: true |
+
+
| Variable | Description |
|---|---|
| a_family.a_second_family.a_variable boolean mandatory | A boolean variable. Default: true |