Modul:Citation/utilities: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
(+ zwei Funktionen)
Keine Bearbeitungszusammenfassung
Zeile 167: Zeile 167:
s = mw.ustring.gsub( s, '([!%?])(%s%.+)', '%1' )
s = mw.ustring.gsub( s, '([!%?])(%s%.+)', '%1' )
return mw.ustring.gsub( s, '([,;:])(%s%.+)', '.' )
return mw.ustring.gsub( s, '([,;:])(%s%.+)', '.' )
end
function cu.insertItem( tab, s, formatStr )
if cu.isSet( s ) then
if formatStr then
table.insert( tab,
mw.ustring.format( formatStr, s )
)
else
table.insert( tab, s )
end
end
end
function cu.insertItem2( tab, s1, s2, formatStr )
if cu.isSet( s1 ) and cu.isSet( s2 ) then
if formatStr then
table.insert( tab,
mw.ustring.format( formatStr, s1, s2 )
)
else
table.insert( tab, s1 )
table.insert( tab, s2 )
end
end
end
end


return cu
return cu
Anonymer Benutzer