doc: fix links in generated documentation

This commit is contained in:
Valeriy.Vyrva 2020-02-28 16:45:04 +03:00 committed by Nick Craig-Wood
parent b1b5e09081
commit f6f95822c1
2 changed files with 7 additions and 7 deletions

View file

@ -110,7 +110,7 @@ def read_doc(doc):
# Remove icons
contents = re.sub(r'<i class="fa.*?</i>\s*', "", contents)
# Make [...](/links/) absolute
contents = re.sub(r'\((\/.*?\/)\)', r"(https://rclone.org\1)", contents)
contents = re.sub(r'\]\((\/.*?\/(#.*)?)\)', r"](https://rclone.org\1)", contents)
# Interpret provider shortcode
# {{< provider name="Amazon S3" home="https://aws.amazon.com/s3/" config="/s3/" >}}
contents = re.sub(r'\{\{<\s+provider.*?name="(.*?)".*?>\}\}', r"\1", contents)