Modul:Citation/utilities: Unterschied zwischen den Versionen

K
keine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
Zeile 125: Zeile 125:
pages = ( '' .. pages ):gsub( '–', '-' ); -- replace endashes with hyphens
pages = ( '' .. pages ):gsub( '–', '-' ); -- replace endashes with hyphens
return pages:gsub( '&[%w+d%];', '-' ); -- replace html entities with hyphens
return pages:gsub( '&[%w+d%];', '-' ); -- replace html entities with hyphens
end
function cu.makeDoiLink( doi )
doi = mw.ustring.gsub( doi, 'https?://doi.org/', '' )
doi = doi:gsub( '%[', '%%5B' )
doi = doi:gsub( '%]', '%%5D' )
return '[' .. 'https://doi.org/' .. mw.uri.encode( doi )
.. ' ' .. doi .. ']'
end
end


return cu
return cu
Anonymer Benutzer