doc: extensions: kconfig: fix module prefix handling

If two modules started with the same prefix, e.g. nrf and nrfxlib, the
file name prefix was incorrectly set with the common prefix. Include
trailing "/" to the comparison, so that we match the full module name.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-11-21 11:51:01 +01:00 committed by Carles Cufí
commit d3c0e95f97

View file

@ -354,8 +354,9 @@ def kconfig_build_resources(app: Sphinx) -> None:
filename = node.filename
for name, path in module_paths.items():
path += "/"
if node.filename.startswith(path):
filename = node.filename.replace(path, f"<module:{name}>")
filename = node.filename.replace(path, f"<module:{name}>/")
break
db.append(