Module:Lang: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Undid revision 809187314 by Trappist the monk (talk))
No edit summary
Line 439: Line 439:
return make_error_msg ('{{lang-xx}}: text has italic markup', args.no_cat);
return make_error_msg ('{{lang-xx}}: text has italic markup', args.no_cat);
end
end

if args.text:match ("^\'[^\']+") then -- first character is single \' which may interfere with italic markup; convert to entity
args.text:gsub ("^\'", '&\x27;')
end

if args.text:match ("[^\']\'$") then -- last character is single \' which may interfere with italic markup; convert to entity
args.text:gsub ("\'$", '&\x27;')
end

args.code = format_ietf_tag (code, script, region, variant); -- format to recommended subtag styles
args.code = format_ietf_tag (code, script, region, variant); -- format to recommended subtag styles