Zum Inhalt springen

Modul:LinkISBN: Unterschied zwischen den Versionen

Wartung
(Wartung)
(Wartung)
Zeile 31: Zeile 31:


local comment = '', t
local comment = '', t
t = mw.ustring.gsub( m, '(.*)(%(.*%))$', '%2' )
m, comment = lb.extractComment( m )
if t ~= m then
comment = t
m = mw.ustring.gsub( mw.ustring.gsub( m, '(.*)(%(.*%))$', '%1' ), '( +)$', '' )
end


m = mw.ustring.gsub( m, 'ISBN ', '' )
m = m:gsub( 'ISBN *', '' ):upper() -- x -> X
m = m:upper() -- x -> X
t = '<span class="' .. li.class .. '" title="' .. li.special .. m
t = '<span class="' .. li.class .. '" title="' .. li.special .. m
.. '">[[' .. li.special .. m .. '|' .. 'ISBN ' .. m .. ']]</span>'
.. '">[[' .. li.special .. m .. '|' .. 'ISBN ' .. m .. ']]</span>'
if not noerror then
if not noerror then
if demo then
t = t .. ci._check_isbn( m, li.invalid .. ( demo and '' or li.invalidCat ) )
t = t .. ci._check_isbn( m, li.invalid )
else
t = t .. ci._check_isbn( m, li.invalid .. li.invalidCat )
end
end
end
if comment ~= '' then
if comment ~= '' then
Zeile 55: Zeile 46:


function li.linkISBNSet( args )
function li.linkISBNSet( args )
args.isbn    = args.isbn or args[1] or ''
args.isbn    = args.isbn or args[ 1 ] or ''
args.noerror = yn( args.noerror or '', false )
args.noerror = yn( args.noerror, false )
if args.isbn == '' then
if args.isbn == '' then
return ''
return ''
Anonymer Benutzer