From e107611294327fa0645ac54d1f48ab0d42917064 Mon Sep 17 00:00:00 2001 From: Paula Derrenger <107626595+pderrenger@users.noreply.github.com> Date: Sat, 19 Oct 2024 21:27:03 +0200 Subject: [PATCH] Fix build_docs regex for trailing URL periods (#17036) Co-authored-by: Glenn Jocher --- docs/build_docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/build_docs.py b/docs/build_docs.py index 82e4d6d323..f685fdddd9 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -199,11 +199,11 @@ def convert_plaintext_links_to_html(content): for text_node in paragraph.find_all(string=True, recursive=False): if text_node.parent.name not in {"a", "code"}: # Ignore links and code blocks new_text = re.sub( - r"(https?://[^\s()<>]+)", + r"(https?://[^\s()<>]*[^\s()<>.,:;!?])", r'\1', str(text_node), ) - if "