Module:Fd

-- local p = {}

local find = string.find local tostring,match = tostring,match

function p.get(frame) local args = (frame.args[1] and frame.args) or frame:getParent.args args[1] = tostring(args[1])

if find(args[1],".", 1, true) == nil or find(args[1], "[0-9]") == nil then return args[1] end

if find(args[1], " ", 1, true) == nil then local a, b, c = args[1]:match"([^%.]*)%.([0-9]*)(.*)" return a .. ". " .. b .. " " .. c	end

local a,b,c = args[1]:match"([^%.]*)%.(.*) (.*)"

if find(b, "<span", 1, true) == nil then return a .. ". " .. b .. " " .. c   end

return a .. ". " .. b .. " " .. c end

function p.getmulti(frame) local args = (frame.args[1] and frame.args) or frame:getParent.args args[1] = tostring(args[1])

if find(args[1], ".", 1, true) == nil or find(args[1], "[0-9]") == nil then return args[1] end local val   = require('Module:Feature').split(args[1], ".", true) local values = {val[1]} local len_values = 1 local i     = 2 while val[i] ~= nil do       if find(val[i]," ", 1, true) == nil then local b,c   = val[i]:match"([0-9]*)(.*)" len_values = len_values + 1

if find(b, "[0-9]") == nil then values[len_values] = "." .. val[i] else values[len_values] = ". " .. b .. " " .. c           end else local b,c   = val[i]:match"(.*) (.*)" len_values = len_values + 1

if find(b, "[0-9]") == nil then values[len_values] = "." .. val[i] elseif find(b, "<span", 1, true) == nil then values[len_values] = ". " .. b .. " " .. c           else values[len_values] = ". " .. b .. " " .. c           end end

i = i + 1 end return table.concat(values) end

return p

-- --