From: Roland Dobai Date: Tue, 29 Jan 2019 15:27:02 +0000 (+0100) Subject: tools: replace absolute URLs in Kconfig docs X-Git-Tag: v3.3-beta2~78^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d156fd734d753fe2dad80705583e43f381fb8ba;p=esp-idf tools: replace absolute URLs in Kconfig docs --- 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