Anonymous user
Module:Lang: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 204:
table.insert (out, '</span>');
table.insert (out, '[[Category:lang and lang-xx template errors]]');
return table.concat (out);
Line 304:
local title;
local tout = {};
local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards
table.insert (tout, "''<span title=\"");
Line 344:
--[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------
This function checks the content of args.text and returns empty string if nothing is amiss else it returns an
error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup.
Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text
either as ''itself''' or as '''''bold italic'''''.
Also protects single leading and trailing single quote marks from being converted to bold by the addition of
adjacent italic markup.
]]
Line 352 ⟶ 361:
end
if args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 6+ appostrophes
return make_error_msg (table.concat ({'{{', template, '}}: text has malformed markup'}), args.nocat);
end
if args.text:match ("%f[\']\'\'[^\']+\'\'%f[^\']") or args.text:match ("\'\'\'\'\'[^\']+\'\'\'\'\'") then -- italic but not bold, or bold italic
return make_error_msg (table.concat ({'{{', template, '}}: text has italic markup'}), args.nocat);
end
if args.text:find ("\'\'\'\'") then --
return make_error_msg (table.concat ({'{{', template, '}}: text has malformed markup'}), args.nocat);
end
if 'yes' == args.italic then -- protect single quote marks from being converted to bold markup
end
end
|