Content deleted Content added
debug again then |
mw.ustring.len? but surely they didnt trigger that |
||
Line 184:
-- Additionally check how many digits we actually have, as arbitrary number isn't valid
if (#foundMatch <= 2) then
return ELEMENT_ONETWODIGITS, tonumber(foundMatch), (currentPosition >
elseif (#foundMatch == 4) then
return ELEMENT_FOURDIGITS, tonumber(foundMatch), (currentPosition >
else
return ELEMENT_INVALID -- just the invalid, the number of digits won't match any pattern
Line 196:
if (foundPositionStart) then
currentPosition = foundPositionEnd + 1 -- this is our new start ___location
return ELEMENT_TIMEPERIOD, foundMatch, (currentPosition >
end
Line 211:
if (monthIndex) then
return ELEMENT_MONTHWORD, monthIndex, (currentPosition >
else
return ELEMENT_INVALID -- just the invalid, the word didn't match a valid month name
Line 227:
if (foundMatch == '-') then -- nothing else is date separator, no hyphens no stuff like that
return ELEMENT_DATESEPARATOR, foundMatch, (currentPosition >
else
return ELEMENT_DASH, foundMatch, (currentPosition >
end
end
Line 236:
if (foundPositionStart) then
currentPosition = foundPositionEnd + 1 -- this is our new start ___location
return ELEMENT_DASH, foundMatch, (currentPosition >
end
-- Time separator (colon without whitespace)
foundPositionStart, foundPositionEnd, foundMatch = mw.ustring.find(seekString, '^(:)', currentPosition)
if (foundPositionStart) then
currentPosition = foundPositionEnd + 1 -- this is our new start ___location
return ELEMENT_TIMESEPARATOR, foundMatch, (currentPosition >
end
Line 249 ⟶ 250:
if (foundPositionStart) then
currentPosition = foundPositionEnd + 1 -- this is our new start ___location
return ELEMENT_COMMA, foundMatch, (currentPosition >
end
Line 256 ⟶ 257:
if (foundPositionStart) then
currentPosition = foundPositionEnd + 1 -- this is our new start ___location
return ELEMENT_WHITESPACE, foundMatch, (currentPosition >
end
|