mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
parse_pages - more bugfixes
(cherry picked from commit 92387ad6ddba27bf208d6866c6ce570ff128859a)
This commit is contained in:
@@ -120,8 +120,11 @@ def markdown_in_div_elements(md):
|
|||||||
def substitute_links_for_target(soup, target):
|
def substitute_links_for_target(soup, target):
|
||||||
"""Replaces local-html-links with appropriate substitutions
|
"""Replaces local-html-links with appropriate substitutions
|
||||||
for the given target"""
|
for the given target"""
|
||||||
logger.info("... modifying links for target", target["name"])
|
target = get_target(target)
|
||||||
if not pages:
|
|
||||||
|
logger.info("... modifying links for target: %s" % target["name"])
|
||||||
|
# We actually want to get all pages, even the ones that aren't built as
|
||||||
|
# part of this target, in case those pages have replacement links.
|
||||||
pages = get_pages()
|
pages = get_pages()
|
||||||
|
|
||||||
links = soup.find_all("a", href=re.compile(r"^[^.]+\.html"))
|
links = soup.find_all("a", href=re.compile(r"^[^.]+\.html"))
|
||||||
@@ -240,6 +243,7 @@ def get_pages(target=None):
|
|||||||
"""Read pages from config and return an object, optionally filtered
|
"""Read pages from config and return an object, optionally filtered
|
||||||
to just the pages that this target cares about"""
|
to just the pages that this target cares about"""
|
||||||
|
|
||||||
|
target = get_target(target)
|
||||||
pages = config["pages"]
|
pages = config["pages"]
|
||||||
|
|
||||||
if target["name"]:
|
if target["name"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user