Module:Citation/CS1/Identifiers: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 564:
Suffix: character string of any length using any character in the UCS-2 character set chosen by the registrant
 
This function checks a HDL name for: prefix/suffix. If the HDL name contains spaces, endashes, or, if it ends
with a period or a comma, this function will emit a bad_hdl error message.
 
HDL names are case-insensitive and can incorporate any printable Unicode characters so the test for spacesendashes and
terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely
if ever used in HDLs.
Line 579:
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode})
 
if nil == id:match("^[^%Ss–]-/[^%Ss–]-[^%.,]$") then -- hdl must contain a fwd slash, must not contain spaces, endashes, and must not end with period or comma
text = text .. ' ' .. set_error( 'bad_hdl' );
end