update fmt lib
This commit is contained in:
18
lib/fmt.lua
18
lib/fmt.lua
@@ -41,8 +41,22 @@ function fmt.blue(str)
|
|||||||
return fmt.colored(str, md_colors.blue_500)
|
return fmt.colored(str, md_colors.blue_500)
|
||||||
end
|
end
|
||||||
|
|
||||||
function fmt.space(str)
|
function fmt.small(str)
|
||||||
return " "
|
return "<small>"..str.."</small>"
|
||||||
|
end
|
||||||
|
|
||||||
|
function fmt.big(str)
|
||||||
|
return "<big>"..str.."</big>"
|
||||||
|
end
|
||||||
|
|
||||||
|
function fmt.space(n)
|
||||||
|
local num = 1
|
||||||
|
|
||||||
|
if n ~= nil and n > 1 then
|
||||||
|
num = n
|
||||||
|
end
|
||||||
|
|
||||||
|
return string.rep(" ", num)
|
||||||
end
|
end
|
||||||
|
|
||||||
function fmt.escape(str)
|
function fmt.escape(str)
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ function on_resume()
|
|||||||
fmt.blue("blue"),
|
fmt.blue("blue"),
|
||||||
fmt.colored("lime", "#00FF00"),
|
fmt.colored("lime", "#00FF00"),
|
||||||
fmt.bg_colored(fmt.colored("lime background", "#000000"), "#00FF00"),
|
fmt.bg_colored(fmt.colored("lime background", "#000000"), "#00FF00"),
|
||||||
|
fmt.small("small font"),
|
||||||
|
fmt.big("big font"),
|
||||||
fmt.space().."start with space",
|
fmt.space().."start with space",
|
||||||
|
fmt.space(4).."start with tab",
|
||||||
fmt.escape("<b>not parsed</b>"),
|
fmt.escape("<b>not parsed</b>"),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user