Modul:Cite tweet: Unterschied zwischen den Versionen
K (correct variable name) |
(Fix errors found by testcases) |
||
Zeile 41: | Zeile 41: | ||
cite_args.author = args['author-link'] .. '[@' .. (args.user or '') .. ']' | cite_args.author = args['author-link'] .. '[@' .. (args.user or '') .. ']' | ||
else | else | ||
cite_args.author = '@' .. args.user | cite_args.author = '@' .. (args.user or '') | ||
end | end | ||
cite_args.date = args.date or (_if(args.number) and TwitterSnowflake.snowflakeToDate{ args = {id_str = args.number} }) | cite_args.date = args.date or (_if(args.number) and TwitterSnowflake.snowflakeToDate{ args = {id_str = args.number} }) | ||
Zeile 63: | Zeile 63: | ||
end | end | ||
errors[1 + #errors] = TwitterSnowflake.datecheck{ args = { | errors[1 + #errors] = TwitterSnowflake.datecheck{ args = { | ||
id_str = args.number, | id_str = args.number or '', | ||
date = args.date, | date = args.date or '', | ||
error1 = '<kbd>|date=</kbd> mismatches calculated date from <kbd>|number=</kbd> by two or more days;', | error1 = '<kbd>|date=</kbd> mismatches calculated date from <kbd>|number=</kbd> by two or more days;', | ||
error2 = 'Missing or empty <kbd>|date=</kbd>, and posted before November 4, 2010;', | error2 = 'Missing or empty <kbd>|date=</kbd>, and posted before November 4, 2010;', |