mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-05 13:06:03 +00:00
docs: resolve local links script escape (#21840)
Fixing warnings. Needs to be propagated to 0.1 branch if this works. 
This commit is contained in:
@@ -21,7 +21,7 @@ if __name__ == "__main__":
|
||||
with open(full_destination, "r") as f:
|
||||
content = f.read()
|
||||
# remove images
|
||||
content = re.sub("\!\[.*?\]\((.*?)\)", "", content)
|
||||
content = re.sub(r"\!\[.*?\]\((.*?)\)", "", content)
|
||||
with open(full_destination, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
@@ -39,7 +39,7 @@ sidebar_class_name: hidden
|
||||
content = f.read()
|
||||
|
||||
# replace relative links
|
||||
content = re.sub("\]\(\.\.\/", "](/docs/templates/", content)
|
||||
content = re.sub(r"\]\(\.\.\/", "](/docs/templates/", content)
|
||||
|
||||
with open(templates_index_intermediate, "w") as f:
|
||||
f.write(sidebar_hidden + content)
|
||||
|
@@ -11,7 +11,7 @@ def update_links(doc_path, docs_link):
|
||||
content = f.read()
|
||||
|
||||
# replace relative links
|
||||
content = re.sub("\]\(\.\/", f"]({docs_link}", content)
|
||||
content = re.sub(r"\]\(\.\/", f"]({docs_link}", content)
|
||||
|
||||
with open(DOCS_DIR / doc_path, "w") as f:
|
||||
f.write(content)
|
||||
|
Reference in New Issue
Block a user