mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
tools: replace absolute URLs in Kconfig docs
This commit is contained in:
@@ -94,6 +94,8 @@ def format_rest_text(text, indent):
|
|||||||
# Escape some characters which are inline formatting in ReST
|
# Escape some characters which are inline formatting in ReST
|
||||||
text = text.replace("*", "\\*")
|
text = text.replace("*", "\\*")
|
||||||
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'
|
text += '\n'
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user