Module:uz-wiki-utils

Hello, you have come here looking for the meaning of the word Module:uz-wiki-utils. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:uz-wiki-utils, but we will also tell you about its etymology, its characteristics and you will know how to say Module:uz-wiki-utils in singular and plural. Everything you need to know about the word Module:uz-wiki-utils you have here. The definition of the word Module:uz-wiki-utils will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:uz-wiki-utils, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module is used in Module:uz-inflection-docs


-- Module:wiki-utils v0.2
-- 2015-07-06

-- This module contains useful functions which help to generate wiki-text.
-- It can be used in other modules with using "require" command.

local export = {}

function export.table_class()
	return 'class="prettytable"'
end

function export.link(name, value)
	return ']'
end

function export.bold(value)
	return "'''" .. value .. "'''"
end

function export.italic(value)
	return "''" .. value .. "''"
end

function export.colored_code(value, color)
	return '<code style="color: ' .. color .. '">' .. value .. '</code>'
end

function export.code_green(value)
	return export.colored_code(value, 'green')
end

function export.code_blue(value)
	return export.colored_code(value, 'darkblue')
end

function export.code_purple(value)
	return export.colored_code(value, 'purple')
end

function export.code_maroon(value)
	return export.colored_code(value, 'maroon')
end

function export.code_red(value)
	return export.colored_code(value, 'red')
end

function export.code_olive_bold(value)
	return export.bold(export.colored_code(value, 'olive'))
end

function export.colored_span(value, color)
	return '<span style="color: ' .. color .. '">' .. value .. '</span>'
end

function export.span_blue(value)
	return export.colored_span(value, 'blue')
end

function export.span_darkblue(value)
	return export.colored_span(value, 'darkblue')
end

function export.span_purple(value)
	return export.colored_span(value, 'purple')
end

function export.span_green(value)
	return export.colored_span(value, 'green')
end

function export.span_maroon(value)
	return export.colored_span(value, 'maroon')
end

function export.span_red(value)
	return export.colored_span(value, 'red')
end

function export.span_gray(value)
	return export.colored_span(value, 'gray')
end

function export.span_silver(value)
	return export.colored_span(value, 'silver')
end

function export.anchor(prefix, name)
	return '{{anchor|' .. prefix .. ' ' .. name .. '}}'
end

return export