Fix problem displaying images in RST preview
This commit is contained in:
@@ -13,6 +13,7 @@ import tempfile
|
||||
page_contents = sys.stdin.read()
|
||||
|
||||
base_url = "https://projects.blender.org"
|
||||
uatest_base_url = "https://uatest.projects.blender.org"
|
||||
local_url = "http://localhost:3000"
|
||||
placeholder_url = "https://placeholder.org"
|
||||
|
||||
@@ -20,6 +21,8 @@ placeholder_url = "https://placeholder.org"
|
||||
gitea_prefix = os.environ.get("GITEA_PREFIX_SRC", "")
|
||||
if gitea_prefix.startswith(base_url):
|
||||
gitea_prefix = gitea_prefix[len(base_url):]
|
||||
if gitea_prefix.startswith(uatest_base_url):
|
||||
gitea_prefix = gitea_prefix[len(uatest_base_url):]
|
||||
if gitea_prefix.startswith(local_url):
|
||||
gitea_prefix = gitea_prefix[len(local_url):]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user