| SOLDOUT_RENDERERS(3) | Library Functions Manual | SOLDOUT_RENDERERS(3) |
soldout_renderers,
lus_attr_escape,
lus_body_escape — various
markdown to HTML renderers for soldout
#include
<renderers.h>
void
lus_attr_escape(struct buf *ob,
const char *str, size_t
len);
void
lus_body_escape(struct buf *ob,
const char *str, size_t
len);
extern const struct mkd_renderer mkd_html;
extern const struct mkd_renderer mkd_xhtml;
extern const struct mkd_renderer discount_html;
extern const struct mkd_renderer discount_xhtml;
extern const struct mkd_renderer nat_html;
extern const struct mkd_renderer nat_xhtml;
The
lus_attr_escape()
and
lus_body_escape()
functions escape all problematic characters in (X)HTML:
‘<’,
‘>’,
‘&’,
‘"’; and
‘<’,
‘>’,
‘&’ respectively. They accept a
string str of the length len and
output into ob buffer.
All provided renderers come with two flavors, _html producing HTML code (self-closing tags are rendered like this: <hr>), and _xhtml producing XHTML code (self-closing tags like <hr />).
mkd_html and mkd_xhtml implement standard markdown to (X)HTML translation without any extension.
discount_html and discount_xhtml implement on top of the standard markdown some of the extensions found in Discount and PHP-Markdown-like tables. Here is a list of all extensions included in these renderers:
nat_html and nat_xhtml implement on top of Discount extensions and Natasha's own extensions. Here is a list of these extensions:
The lus_attr_escape() and
lus_body_escape() functions do not return a
value.
The soldout library was written by
Natasha "Kerensikova" Porte
<natacha@instinctive.eu>.
Manual page was originally written by Massimo Manghi
<mxmanghi@apache.org>,
and rewritten to mdoc format by Svyatoslav Mishyn
<juef@openmailbox.org>.
| April 13, 2016 | Debian |