From 4d156fd734d753fe2dad80705583e43f381fb8ba Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Tue, 29 Jan 2019 16:27:02 +0100 Subject: [PATCH] tools: replace absolute URLs in Kconfig docs --- tools/kconfig_new/gen_kconfig_doc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/kconfig_new/gen_kconfig_doc.py b/tools/kconfig_new/gen_kconfig_doc.py index 49169b1336..6d6d7b1faf 100644 --- a/tools/kconfig_new/gen_kconfig_doc.py +++ b/tools/kconfig_new/gen_kconfig_doc.py @@ -94,6 +94,8 @@ def format_rest_text(text, indent): # Escape some characters which are inline formatting in ReST text = text.replace("*", "\\*") text = text.replace("_", "\\_") + # replace absolute links to documentation by relative ones + text = re.sub(r'https://docs.espressif.com/projects/esp-idf/\w+/\w+/(.+)\.html', r':doc:`../\1`', text) text += '\n' return text -- 2.40.0