모듈:CheckURL

From 더 스토리즈 대피소
Jump to navigation Jump to search

이 모듈에 대한 설명문서는 모듈:CheckURL/설명문서에서 만들 수 있습니다

local p = {}

function p.checkURL(frame)

	local check_a = string.match(frame.args[1], "^https://")
	local check_b = string.match(frame.args[1], "^http://")

	if check_a or check_b then
	    return string.format("[%s %s]", frame.args[1], frame.args[2]) 
	else
	    return string.format("[[%s|%s]]", frame.args[1], frame.args[2]) 
	end

end

return p