mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-07 13:25:50 +00:00
parse_pages - fix bug with local URLs that are substrings of another
This commit is contained in:
@@ -110,9 +110,11 @@ def parse_markdown(md, target=DEFAULT_TARGET, pages=None):
|
|||||||
for page in pages:
|
for page in pages:
|
||||||
if target in page:
|
if target in page:
|
||||||
#There's a replacement link for this env
|
#There's a replacement link for this env
|
||||||
if page["html"] in link["href"]:
|
local_url = page["html"]
|
||||||
link["href"] = link["href"].replace(page["html"],
|
target_url = page[target]
|
||||||
page[target])
|
if link["href"][:len(local_url)] == local_url:
|
||||||
|
link["href"] = link["href"].replace(local_url,
|
||||||
|
target_url)
|
||||||
print("done")
|
print("done")
|
||||||
|
|
||||||
print("re-rendering HTML")
|
print("re-rendering HTML")
|
||||||
|
|||||||
Reference in New Issue
Block a user