-local markup = {}
-
-local fg = {}
-local bg = {}
-
---[[ clean this as soon as you document it
-
- +-- markup
- |
- |`-- bold() Set bold.
- |`-- italic() Set italicized text.
- |`-- strike() Set strikethrough text.
- |`-- underline() Set underlined text.
- |`-- monospace() Set monospaced text.
- |`-- big() Set bigger text.
- |`-- small() Set smaller text.
- |`-- font() Set the font of the text.
- |
- |`--+ bg
- | |
- | |`-- color() Set background color.
- | |`-- focus() Set focus background color.
- | |`-- normal() Set normal background color.
- | `-- urgent() Set urgent background color.
- |
- |`--+ fg
- | |
- | |`-- color() Set foreground color.
- | |`-- focus() Set focus foreground color.
- | |`-- normal() Set normal foreground color.
- | `-- urgent() Set urgent foreground color.
- |
- |`-- focus() Set both foreground and background focus colors.
- |`-- normal() Set both foreground and background normal colors.
- `-- urgent() Set both foreground and background urgent colors.
-
-]]
-
--- Convenience tags.
-function markup.bold(text) return '<b>' .. tostring(text) .. '</b>' end
-function markup.italic(text) return '<i>' .. tostring(text) .. '</i>' end
-function markup.strike(text) return '<s>' .. tostring(text) .. '</s>' end
-function markup.underline(text) return '<u>' .. tostring(text) .. '</u>' end
-function markup.monospace(text) return '<tt>' .. tostring(text) .. '</tt>' end
-function markup.big(text) return '<big>' .. tostring(text) .. '</big>' end
-function markup.small(text) return '<small>' .. tostring(text) .. '</small>' end
-
--- Set the font.
+local markup = { fg = {}, bg = {} }
+
+-- Convenience tags
+function markup.bold(text) return format("<b>%s</b>", text) end
+function markup.italic(text) return format("<i>%s</i>", text) end
+function markup.strike(text) return format("<s>%s</s>", text) end
+function markup.underline(text) return format("<u>%s</u>", text) end
+function markup.monospace(text) return format("<tt>%s</tt>", text) end
+function markup.big(text) return format("<big>%s</big>", text) end
+function markup.small(text) return format("<small>%s</small>", text) end
+
+-- Set the font