Andrei Thorp wrote:
> Subject: [PATCH 2/4] Lib/Util: Added bold & colour functions
> diff --git a/lib/util/init.lua b/lib/util/init.lua
> new file mode 100644
> index 0000000..6360f87
> --- /dev/null
> +++ b/lib/util/init.lua
> @@ -0,0 +1,21 @@
> +------------------------------------------
> +-- Author: Andrei "Garoth" Thorp        --
> +-- Copyright 2009 Andrei "Garoth" Thorp --
> +------------------------------------------
> +module("obvious.lib.util")
> +
> +-- Set Foreground colour of text
> +-- @param colour The colour you want to set the text to
> +-- @param text The text you want to colour
> +-- @return The coloured string
> +function colour(colour, text)
> +        return '<span color="' .. colour .. '">' .. text .. '</span>'
> +end
> +
> +-- Make bold text
> +-- @param text The text you want to make bold
> +-- @return The bolded text
> +function bold(text)
> +        return '<b>' .. text .. '</b>'
> +end
> +-- vim: 
> filetype=lua:expandtab:shiftwidth=4:tabstop=4:softtabstop=4:encoding=utf-8:textwidth=80

Looks good I guess. But | can do better[1] (This is based on some code that |
nopasted and i tweaked it a little, oh and who needs luadoc anyway? ;) ).

Uli

[1]
http://git.znc.in/?p=psychon/dotfiles.git;a=blob;f=config/awesome/markup.lua;hb=HEAD

-- 
"Do you know that books smell like nutmeg or some spice from a foreign land?"
                                                  -- Faber in Fahrenheit 451

-- 
To unsubscribe, send mail to [email protected].

Reply via email to