doc: extensions: kconfig: handle promptless choices showing as parents
Promptless choices can show up as parents when, e.g., people define choices in multiple locations, including modules. Render them using the built-in Kconfig expression to string formatter, so that they show up as '<choice (...)>'. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
63c793aba0
commit
46fb9509bf
1 changed files with 5 additions and 1 deletions
|
@ -337,7 +337,11 @@ def kconfig_build_resources(app: Sphinx) -> None:
|
|||
iternode = node
|
||||
while iternode.parent is not iternode.kconfig.top_node:
|
||||
iternode = iternode.parent
|
||||
menupath = f" > {iternode.prompt[0]}" + menupath
|
||||
if iternode.prompt:
|
||||
title = iternode.prompt[0]
|
||||
else:
|
||||
title = kconfiglib.standard_sc_expr_str(iternode.item)
|
||||
menupath = f" > {title}" + menupath
|
||||
|
||||
menupath = "(Top)" + menupath
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue