Module:Infobox MOS: Difference between revisions

Ganaram inukshuk (talk | contribs)
Fixed logic for tamnams info section
Ganaram inukshuk (talk | contribs)
m "Tamnams info" becomes "descendant info" if the mos ancestor isn't tamnams-named
Line 242: Line 242:
local is_root_mos = input_mos.nL == input_mos.ns
local is_root_mos = input_mos.nL == input_mos.ns
local section_header = nil
local section_entries = nil
local section_entries = nil
if is_octave_equivalent then
if is_octave_equivalent then
if is_within_named_range then
if is_within_named_range then
-- Mos has a tamnams name
-- Mos has a tamnams name
section_header = "TAMNAMS information"
section_entries = {
section_entries = {
{"[[TAMNAMS#Mos_pattern_names | Name]]", tamnams_name},
{"[[TAMNAMS#Mos_pattern_names | Name]]", tamnams_name},
Line 262: Line 264:
end
end
section_header = "Descendant information"
section_entries = {
section_entries = {
{"Descendant of", ancestor_entry}
{"Descends from", ancestor_entry}
}
}
end
end
end
end
local section_header = "TAMNAMS information"
if section_entries ~= nil then
if section_entries ~= nil then