Modul:Hatnote list: Unterschied zwischen den Versionen
K
1 Version importiert
K (1 Version importiert) |
K (1 Version importiert) |
||
| (Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt) | |||
| Zeile 96: | Zeile 96: | ||
} | } | ||
--Collapses duplicate punctuation | --Collapses duplicate punctuation at end of string, ignoring italics and links | ||
local function punctuationCollapse (text) | local function punctuationCollapse (text) | ||
return text:match("[.?!]('?)%1(%]?)%2%.$") and text:sub(1, -2) or text | |||
end | end | ||
| Zeile 150: | Zeile 141: | ||
-- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} | -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} | ||
while args[i + 2] == options.andKeyword do | while args[i + 2] == options.andKeyword do | ||
if args[i + 3] then | if args[i + 3] then | ||
table.insert(forRow.pages, args[i + 3]) | table.insert(forRow.pages, args[i + 3]) | ||
end | end | ||
| Zeile 161: | Zeile 152: | ||
table.insert(forTable, forRow) | table.insert(forTable, forRow) | ||
until terminated or i > maxArg | until terminated or i > maxArg | ||
return forTable | return forTable | ||
end | end | ||