Add "bis 2000" notation
Handle cases correctly, where "bis 2000" is used as param 1. Replace
with "{{0|0000}}–" construct
This commit is contained in:
@@ -120,6 +120,10 @@ class TeamstationBot( CurrentPageBot ): # sets 'current_page' on each treat()
|
||||
# Get value of param 1
|
||||
jahre = occ.get(1);
|
||||
|
||||
# Normalize rarely used "bis 2000" notation
|
||||
if "bis" in jahre.value:
|
||||
jahre.value.replace("bis", "{{0|0000}}\u2013")
|
||||
|
||||
# Get parts of value
|
||||
mo = re.search(r"\s*(\{\{0\|0000\}\}|(?:1|2)\d{3})\s*(–|‐|-|‑|‒|—|―|˗)?\s*((?:1|2)\d{3})?",str(jahre.value))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user