Module:alternative forms: Difference between revisions
No edit summary |
No edit summary |
||
| Line 42: | Line 42: | ||
stop_when = function(data) | stop_when = function(data) | ||
local stop = not data.any_param_at_index | local stop = not data.any_param_at_index | ||
-- If we haven't found any items yet (stored_itemno == 1), do NOT stop on a hole. | |||
-- Just skip it and keep looking for the first term. | |||
if stop and data.stored_itemno > 1 then | |||
return true | |||
end | |||
if stop and parent_args[data.orig_index + 1] == nil then | if stop and parent_args[data.orig_index + 1] == nil then | ||
track("actual hole in params") | track("actual hole in params") | ||
end | end | ||
return | return false | ||
end, | end, | ||
default_separator = default_separator, | default_separator = default_separator, | ||
| Line 122: | Line 129: | ||
if labels then | if labels then | ||
if lang:hasTranslit() then | if lang:hasTranslit() then | ||
ins(" | ins(" — " .. require(labels_module).format_processed_labels { | ||
labels = labels, lang = lang | labels = labels, lang = lang | ||
}) | }) | ||
| Line 144: | Line 151: | ||
return export.display_alternative_forms(parent_args, title) | return export.display_alternative_forms(parent_args, title) | ||
end | end | ||
return export | return export | ||