Module:Unicode data: Difference between revisions

m
1 revision imported
m (1 revision imported from wikipedia:Module:Unicode_data)
m (1 revision imported)
 
(One intermediate revision by one other user not shown)
Line 98:
{ 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G
{ 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H
{ 0x2EBF0, 0x2EE5D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension I
{ 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use
{ 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use
Line 161 ⟶ 162:
end
 
--[[
-- No image data modules on Wikipedia yet.
function p.lookup_image(codepoint)
local data = loader[('images/%03X'):format(codepoint / 0x1000)]
Line 170 ⟶ 169:
end
end
--]]
 
local planes = {
Line 481 ⟶ 479:
return result
end
 
 
--[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------
 
external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so
that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text
has <br /> tags.
 
--]]
 
function p.is_rtl_frame (frame)
local str = frame.args[1]; -- get the string from the {{#invoke:}} frame
str = str:gsub ('%b<>', ''); -- strip any html and html-like tags
return p.is_rtl (str); -- return if whatever remains rtl; false else
end
 
 
local function get_codepoint(args, arg)
Bureaucrats, rtl-contributors, Administrators
1,619

edits