ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/ValBot/Python/check_interwiki_links.py
(Generate patch)

Comparing ValBot/Python/check_interwiki_links.py (file contents):
Revision 1191 by iritscen, Sat Jul 6 22:01:44 2024 UTC vs.
Revision 1192 by iritscen, Mon Sep 16 23:08:26 2024 UTC

# Line 179 | Line 179 | def scan_for_interwiki_links(page_text,
179  
180     for prefix in interwiki_prefixes:
181        # Isolate strings that start with "[[prefix:" and end with "|" or "]"
182 <      iw_link = "\[\[" + prefix + ":[^|\]]*(\||\])"
182 >      iw_link = r"\[\[" + prefix + r":[^|\]]*(\||\])"
183        for match in re.finditer(iw_link, page_text):
184           # Extract just the page title from this regex match
185           s = match.start() + 2 + len(prefix) + 1

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)