tools: replace absolute URLs in Kconfig docs

This commit is contained in:
Roland Dobai 2019-01-29 16:27:02 +01:00
parent 37126d3451
commit 4d156fd734

View file

@ -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