Module:headword: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 623: Line 623:
-- convert old-style `heads`, `translits` and `transcriptions` to new-style
-- convert old-style `heads`, `translits` and `transcriptions` to new-style
local maxind = math.max(
local maxind = math.max(
init_and_find_maximum_index(data, "heads"),
init_and_find_maximum_index(data, "heads", true),
init_and_find_maximum_index(data, "translits", true),
init_and_find_maximum_index(data, "translits", true),
init_and_find_maximum_index(data, "transcriptions", true)
init_and_find_maximum_index(data, "transcriptions", true)
Line 643: Line 643:
------------ 4. Initialize and validate `data.categories` and `data.whole_page_categories`, and determine `pos_category` if not given, and add basic categories. ------------
------------ 4. Initialize and validate `data.categories` and `data.whole_page_categories`, and determine `pos_category` if not given, and add basic categories. ------------


init_and_find_maximum_index(data, "categories")
init_and_find_maximum_index(data, "categories", true)
init_and_find_maximum_index(data, "whole_page_categories")
init_and_find_maximum_index(data, "whole_page_categories", true)
local pos_category_already_present = false
local pos_category_already_present = false
if #data.categories > 0 then
if #data.categories > 0 then