This document describes version 3.0.3 of Hoedown, a C language library implementing a template library. This distribution is an repackaging of the original Hoedown package, using the GNU Autotools.
The latest release of the repackaged Hoedown can be downloaded from:
the original package development takes place at:
development takes place at:
and as backup at:
Copyright © 2008, Natacha Porte
Copyright © 2011, Vicent Marti
Copyright © 2014, Xavier Mendez, Devin Torres and the Hoedown authors
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Appendices
Indexes
This document describes version 3.0.3 of Hoedown, a C language library implementing a Markdown parser. This distribution is an repackaging of the original Hoedown package, using the GNU Autotools.
Hoedown is a revived fork of Sundown, the Markdown parser based on the original code of the Upskirt library by Natacha Porte.
Features:
We've worked very hard to make Hoedown never leak or crash under any input.
Warning: Hoedown doesn't validate or post–process the
HTML in Markdown documents. Unless you use ‘HTML_ESCAPE’ or
‘HTML_SKIP’, you should strongly consider using a good
post–processor in conjunction with Hoedown to prevent client–side
attacks.
Hoedown installs multiple header files under the directory
$(includedir)/hoedown
. All the function names in the API are
prefixed with hoedown_
; all the constant names are prefixed with
HOEDOWN_
; all the type names are prefixed with hoedown_
.
This package installs a data file for pkg-config, so when searching for the installed library with the GNU Autotools, we can:
m4_include(meta/autoconf/pkg.m4)
PKG_CHECK_MODULES([HOEDOWN],[hoedown >= 3.0.3])
which will set the variables HOEDOWN_LIBS
and
HOEDOWN_CFLAGS
.
Alternatively we can use the raw GNU Autoconf macros:
AC_CHECK_LIB([hoedown],[hoedown_version],, [AC_MSG_FAILURE([test for Hoedown library failed])]) AC_CHECK_HEADERS([hoedown/version.h],, [AC_MSG_FAILURE([test for Hoedown header failed])])
The package compiles and installs the program hoedown, which can process input Markdown documents and generate HTML output using the built–in HTML renderer. Synopsis:
hoedown [OPTION]... [FILE]
Process the Markdown in ‘FILE’ (or standard input) and render it to standard output, using the Hoedown library. Parsing and rendering can be customized through the options below. The default is to parse pure markdown and output HTML.
Main options:
-n
N--max-nesting=
N-t
--toc-level=
N--html
--html-toc
-T
--time
-i
N--input-unit=
N-o
N--output-unit=
N-h
--help
-v
--version
Block extensions:
Span extensions:
Other flags:
Negative flags:
HTML-specific options:
Flags and extensions can be negated by prepending ‘no’ to them, as in --no-tables, --no-span or --no-escape. Options are processed in order, so in case of contradictory options the last specified stands.
When ‘FILE’ is ‘-’, read standard input. If no ‘FILE’ was given, read standard input. Use -- to signal end of option parsing. Exit status is: ‘0’ if no errors occurred, ‘1’ with option parsing errors, ‘4’ with memory allocation errors or ‘5’ with I/O errors.
The package compiles and installs the program smartypants, which translates plain ASCII punctuation characters into “smart” typographic punctuation HTML entities. smartypants performs the following transformations:
<p>"Hello" 'World'!</p>
is converted to:
<p>“Hello” ‘World’!</p>
<p>``Hello World!''</p>
is converted to:
<p>“Hello World!”</p>
<p>Trouble--maker---that is what you are!</p>
is converted to:
<p>Trouble–maker—that is what you are!</p>
Synopsis:
smartypants [OPTION]... [FILE]
Apply SmartyPants smart punctuation to the HTML in ‘FILE’ (or standard input), and output the resulting HTML to standard output.
Main options:
-T
--time
-i
N--input-unit=
N-o
N--output-unit=
N-h
--help
-v
--version
Options are processed in order, so in case of contradictory options the last specified stands.
When ‘FILE’ is ‘-’, read standard input. If no ‘FILE’ was given, read standard input. Use ‘--’ to signal end of option parsing. Exit status is: ‘0’ if no errors occurred, ‘1’ with option parsing errors, ‘4’ with memory allocation errors or ‘5’ with I/O errors.
The definitions of the buffers API are in the header file hoedown/version.h.
Retrieve version numbers, storing them in the referenced
int
locations.
Integers representing version number components.
The definitions of the buffers API are in the header file hoedown/buffer.h.
Type definition for function pointers implementing a memory reallocation callback. It is meant to be used as follows:
void * realloc_callback (void * ptr, size_t len) { ... } hoedown_realloc_callback R = realloc_callback;This function pointer type is meant to match the one of the C Language Standard function
realloc()
.
Type definition for function pointers implementing a memory release callback. It is meant to be used as follows:
void free_callback (void * ptr) { ... } hoedown_free_callback F = free_callback;This function pointer type is meant to match the one of the C Language Standard function
free()
.
Wrapper for the C Language Standard
malloc()
. If memory allocation fails: abort the process by callingabort()
.
Wrapper for the C Language Standard
calloc()
. If memory allocation fails: abort the process by callingabort()
.
Wrapper for the C Language Standard
realloc()
. If memory reallocation fails: abort the process by callingabort()
.
The definitions of the buffers API are in the header file hoedown/buffer.h.
Type of structures representing data buffers. Instances of this type must be initialised by
hoedown_buffer_init()
and finalised byhoedown_buffer_uninit()
.Basic allocation, initialisation and finalisation can be performed as:
hoedown_buffer B; hoedown_buffer_init(&B, 1, realloc, free, free); hoedown_buffer_uninit(&B);or as:
hoedown_buffer * B; B = hoedown_buffer_new(1); hoedown_buffer_free(B);Public fields in the data structure:
size
- The number of octets used in the internal data area. It is the length in octets of the contained data.
Initialise a buffer with custom memory allocators.
buffer must be a pointer referencing an already allocated data structure. When the internal data area is reallocated to make it bigger: reallocation-unit is the minimum increase in the area size, measured in number of bytes.
data_realloc must reference a function used to allocate and/or reallocate a memory block. data_free must reference a function used to release the data area of the buffer. buffer_free must reference a function used to release the
hoedown_buffer
structure itself.
Finalise the given buffer structure. Memory allocated for the internal data area is released using the registered data_free function. The memory block referenced by buf is not released.
Convenience function that allocates a new
hoedown_buffer
structure and initialises it with default memory handlers; internally it makes use ofhoedown_buffer_init()
. Return a pointer to the newly allocated structure.The structure memory block is allocated with the C Language Standard
malloc()
.hoedown_realloc()
is registered as data_realloc function. The C Language Standardfree()
is registered as both data_free and buffer_free function.
Convenience function that finalises and releases the given buffer structure; internally it is similar to
hoedown_buffer_uninit()
. Release both the data area memory and the structure memory using the registered memory handlers.
Reset to empty the given buffer structure. Release the internal data area using the registered memory handlers.
Increase the allocated data area size to the given value. Memory for the data area is allocated and reallocated with the registered memory handlers.
hoedown_buffer B; hoedown_buffer_init(&B, 1, realloc, free, free); { hoedown_buffer_grow(&B, 4096); } hoedown_buffer_uninit(&B);
The definitions of the buffers API are in the header file hoedown/buffer.h.
Append raw data to a buffer. The internal data area is resized as needed and octets referenced by data are copied into it.
hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_put(&B, (const uint8_t*)str, strlen(str)); } hoedown_buffer_uninit(&B);
Append a NUL–terminated string to a buffer.
hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str); } hoedown_buffer_uninit(&B);
Optimized
hoedown_buffer_put()
of a string literal. It is meant to be used when str references a literal string, as in:hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { HOEDOWN_BUFPUTSL(&B, "Hello "); HOEDOWN_BUFPUTSL(&B, "World!"); } hoedown_buffer_uninit(&B);
Append a single char to a buffer.
hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { for (int i=0; i<strlen(str); ++i) { hoedown_buffer_putc(&B, str[i]); } } hoedown_buffer_uninit(&B);
Read from a file and append to a buffer, until EOF or error.
hoedown_buffer B; FILE * M; char str[32]; hoedown_buffer_init(&B, 1024, realloc, free, free); M = fopen("file.ext", "r"); { hoedown_buffer_putf(&B, M); } fclose(M); hoedown_buffer_uninit(&B);
Put a Unicode character encoded as UTF-8.
hoedown_buffer B; uint32_t cp = 0x10FFFF; uint8_t buf[] = { 244, 143, 191, 191 }; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_put_utf8(&B, cp); assert(0 == memcmp(buf, B.data, B.size)); } hoedown_buffer_uninit(&B);
The definitions of the buffers API are in the header file hoedown/buffer.h.
Replace the buffer's contents with raw data.
hoedown_buffer B; static const char * str1 = "Hello World!"; static const char * str2 = "Ciao Mondo!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_put(&B, (const uint8_t*)str1, strlen(str1)); hoedown_buffer_set(&B, (const uint8_t*)str2, strlen(str2)); } hoedown_buffer_uninit(&B);
Replace the buffer's contents with a NUL-terminated string.
hoedown_buffer B; static const char * str1 = "Hello World!"; static const char * str2 = "Ciao Mondo!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str1); assert(0 == memcmp(str1, B.data, B.size)); hoedown_buffer_sets(&B, str2); assert(0 == memcmp(str2, B.data, B.size)); } hoedown_buffer_uninit(&B);
Optimized
hoedown_buffer_sets()
of a string literal. It is meant to be used when str references a literal string, as in:hoedown_buffer B; static const char * str1 = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str1); HOEDOWN_BUFSETSL(&B, "Ciao Mondo!"); } hoedown_buffer_uninit(&B);
The definitions of the buffers API are in the header file hoedown/buffer.h.
Compare a buffer's data with other data for equality: return true (non–zero) if the octets are equal, return false (zero) otherwise.
hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str); assert(0 != hoedown_buffer_eq(&B, (const uint8_t*)str, strlen(str))); } hoedown_buffer_uninit(&B);
Compare a buffer's data with a NUL–terminated string for equality: return true (non–zero) if the octets are equal, return false (zero) otherwise.
hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str); assert(0 != hoedown_buffer_eqs(&B, str)); } hoedown_buffer_uninit(&B);
Optimized
hoedown_buffer_eqs()
of a string literal. It is meant to be used when str references a literal string, as in:hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str); assert(0 != HOEDOWN_BUFEQSL(&B, "Hello World!")); } hoedown_buffer_uninit(&B);
Compare the beginning of a buffer with a string: return zero if the octets are equal; return greater than zero if an octet in buf is found to be greater than the octet in prefix; return less than zero if an octet in buf is found to be less than the octet in prefix.
hoedown_buffer B; static const char * str1 = "Hello World!"; static const char * str2 = "Hello"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str1); assert(0 == hoedown_buffer_prefix(&B, str2)); } hoedown_buffer_uninit(&B);
The definitions of the buffers API are in the header file hoedown/buffer.h.
Remove a given number of bytes from the head of the buffer.
hoedown_buffer B; static const char * str = "Hello World!"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_puts(&B, str); hoedown_buffer_slurp(&B, strlen("Hello ")); assert(0 != hoedown_buffer_eqs(&B, "World!")); } hoedown_buffer_uninit(&B);
Mutate the internal data area so that it valid as NUL-terminated C string. Return a pointer to the data area.
Formatted printing to a buffer.
hoedown_buffer B; static const char * str1 = "Hello"; static const char * str2 = "World"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_buffer_printf(&B, "%s %s!", str1, str2); assert(0 != hoedown_buffer_eqs(&B, "Hello World!")); } hoedown_buffer_uninit(&B);
The definitions of the stacks API are in the header file hoedown/stack.h.
Type of structures representing stacks of pointers. Instances of this type must be initialised by
hoedown_stack_init()
and finalised byhoedown_stack_uninit()
.Basic allocation, initialisation and finalisation can be performed as:
hoedown_stack B; hoedown_stack_init(&B, 123); hoedown_stack_uninit(&B);The data area of stack structures is allocated and reallocated with
hoedown_realloc()
and released with C Language Standardfree()
.
Initialize an already allocated stack structures.
Increase the allocated size to the given value.
The definitions of the stacks API are in the header file hoedown/stack.h.
Push an item to the top of the stack.
Retrieve and remove the item at the top of the stack. If the stack is empty: return
NULL
.
Retrieve the item at the top of the stack. If the stack is empty: return
NULL
.
The definitions of the escaping API are in the header file hoedown/escape.h.
Escape (part of) a URL inside HTML. Escape all the characters in the data memory block that cannot appear in a URL; append the result to the buffer ob.
hoedown_buffer B; const char * str1 = "Father & Son"; const char * str2 = "Father%20&%20Son"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_escape_href(&B, (const uint8_t *)str1, strlen(str1)); print_buffer(&B); assert(0 != hoedown_buffer_eqs(&B, str2)); } hoedown_buffer_uninit(&B);
Escape HTML text from data and write the result in the buffer ob.
hoedown_buffer B; const char * str1 = "Father & Son"; const char * str2 = "Father & Son"; hoedown_buffer_init(&B, 1024, realloc, free, free); { hoedown_escape_html(&B, (const uint8_t *)str1, strlen(str1), 1); print_buffer(&B); assert(0 != hoedown_buffer_eqs(&B, str2)); } hoedown_buffer_uninit(&B);
The definitions of the autolink API are in the header file hoedown/autolink.h.
Type of constants used to configure the behaviour of the autolink helper functions. The following constants are defined:
Verify that a URL has a safe protocol. Assume data references a memory block holding a string of UTF-8 encoded characters. Return true (non–zero) if the prefix of the string matches one among:
http:// https:// / # ftp:// mailto:case insensitively, and the first octet after the prefix represents an alphanumeric character; otherwise return false (zero).
Find the limits of a WWW link in the input Markdown buffer.
This function assumes that:
- The input text is stored in a memory block as array of octets in UTF-8 encoding; the block is input_len octets wide.
- The pointer w_ptr references an octet in the input text at input_offset octets from the beginning.
- The pointer w_ptr references an octet representing the character
w
in UTF-8 encoding:'w' == w_ptr[0]- If input_offset is not zero (that is: w_ptr is not at the beginning of the input text): the octet
w_ptr[-1]
represents a space or a punctuation character according to the C Standard Library functionsispunct()
andisspace()
:ispunct(w_ptr[-1]) || isspace(w_ptr[-1])This function scans the input text starting at w_ptr looking for a sequence of octets representing, in UTF-8 encoding, a web link. The sequence must begin with the prefix ‘www.’ (of which
w_ptr[0]
is the first ‘w’) followed by a string of octets representing:
- Alphanumeric characters according to the C Standard Library function
isalnum()
.- Colon characters ‘:’.
- Dot characters ‘.’.
- Dash characters ‘-’.
the string after ‘www.’ must contain at least one dot or one colon to be considered a valid web link.
If a valid web link is found:
- The string representing the link is appended to the buffer referenced by link, which must be already initialised.
- The number of octets to the left of w_ptr which are part of the web link, is stored in the location referenced by rewind_p. For this function: this value is always ‘0’, because w_ptr references the first octet in the link.
- The return value is the number of octets in the web link. This number is the offset to add to w_ptr to move it to the end of the link in the input text.
If a valid web link is not found: the return value is zero.
char * input_text = \ "the URL is www.hoedown.org/index.html, got it?"; size_t input_len = strlen(input_text); size_t input_offset = strlen("the URL is "); uint8_t * w_ptr = (uint8_t*)(input_text+input_offset); hoedown_buffer link; size_t offset_delta; size_t rewind; assert('w' == input_text[input_offset]); assert('w' == w_ptr[0]); hoedown_buffer_init(&link, 1024, realloc, free, free); { offset_delta = hoedown_autolink__www(&rewind, &link, w_ptr, input_offset, input_len, 0); assert(strlen("www.hoedown.org/index.html") == offset_delta); assert(0 == rewind); assert(hoedown_buffer_eqs(&link, "www.hoedown.org/index.html")); assert(0 == strcmp((char *)(w_ptr+offset_delta), ", got it?")); } hoedown_buffer_uninit(&link);
Find the limits of an email address link in the input Markdown buffer.
This function assumes that:
- The input text is stored in a memory block as array of octets in UTF-8 encoding; the block is input_len octets wide.
- The pointer at_ptr references an octet in the input text at input_offset octets from the beginning.
- The pointer at_ptr references an octet representing the character
@
in UTF-8 encoding:'@' == at_ptr[0]- If input_offset is not zero (that is: at_ptr is not at the beginning of the input text): the octets before at_ptr represent alphanumeric characters (according to the C Standard Library function
isalnum()
) or characters in the set ‘.+-_’.This function scans the input text starting at at_ptr, both in the left and right directions, looking for a sequence of octets representing, in UTF-8 encoding, an email address. The sequence must begin, to the left of the ‘@’ character, with a non–empty prefix composed of:
- Alphanumeric characters according to the C Standard Library function
isalnum()
.- Characters in the set ‘.+-_’.
the sequence must end, to the right of the ‘@’ character, with a non–empty suffix composed of:
- Alphanumeric characters according to the C Standard Library function
isalnum()
.- Characters in the set ‘.-_’.
the suffix must represent a valid host name.
If a valid email address is found:
- The string representing the link is appended to the buffer referenced by link, which must be already initialised.
- The number of octets to the left of at_ptr which are part of the address, is stored in the location referenced by rewind_p.
- The return value is the number of octets in the email address at the right of the at_ptr pointer. This number is the offset to add to at_ptr to move it to the end of the address in the input text.
If a valid email address is not found: the return value is zero.
char * input_text = \ "the address is kate.beckinsale@underworld.earth, got it?"; size_t input_len = strlen(input_text); size_t input_offset = \ strlen("the address is kate.beckinsale"); uint8_t * at_ptr = (uint8_t *)(input_text+input_offset); hoedown_buffer link; size_t offset_delta; size_t rewind; assert('@' == input_text[input_offset]); assert('@' == at_ptr[0]); hoedown_buffer_init(&link, 1024, realloc, free, free); { offset_delta = hoedown_autolink__email(&rewind, &link, at_ptr, input_offset, input_len, 0); assert(strlen("@underworld.earth") == offset_delta); assert(strlen("kate.beckinsale") == rewind); assert(hoedown_buffer_eqs(&link, "kate.beckinsale@underworld.earth")); assert(rewind + offset_delta == link.size); assert(0 == strcmp((char *)(at_ptr+offset_delta), ", got it?")); } hoedown_buffer_uninit(&link);
Find the limits of a URL in the input Markdown buffer.
This function assumes that:
- The input text is stored in a memory block as array of octets in UTF-8 encoding; the block is input_len octets wide.
- The pointer colon_ptr references an octet in the input text at input_offset octets from the beginning.
- The pointer colon_ptr references an octet representing the character
:
in UTF-8 encoding:':' == colon_ptr[0]- If input_offset is not zero (that is: colon_ptr is not at the beginning of the input text): the octets to the left of colon_ptr must represent alphabetic characters according to the C Standard Library function
isalpha()
.This function scans the input text starting at colon_ptr, both in the left and right directions, looking for a sequence of octets representing, in UTF-8 encoding, a URL. The sequence must begin, to the left of the colon character, with a non–empty prefix composed by alphabetic characters, according to the C Standard Library function
isalpha()
. The sequence must end, to the right of the colon character, with a non–empty suffix composed of:
- A sequence of 2 slash characters ‘/’.
- A valid domain name composed of:
- Alphanumeric characters according to the C Standard Library function
isalnum()
.- Colon characters ‘:’.
- Dot characters ‘.’.
- Dash characters ‘-’.
If a valid URL is found:
- The string representing the URL is appended to the buffer referenced by link, which must be already initialised.
- The number of octets to the left of colon_ptr which are part of the URL, is stored in the location referenced by rewind_p.
- The return value is the number of octets in the URL to the right of colon_ptr. This number is the offset to add to colon_ptr to move it to the end of the URL in the input text.
If a valid URL is not found: the return value is zero.
This function honours the ‘HOEDOWN_AUTOLINK_SHORT_DOMAINS’ flag in the flags argument.
char * input_text = \ "the URL is http://www.hoedown.org/index.html, got it?"; size_t input_len = strlen(input_text); size_t input_offset = strlen("the URL is http"); uint8_t * colon_ptr = \ (uint8_t *)(input_text+input_offset); hoedown_buffer link; size_t offset_delta; size_t rewind; assert(':' == input_text[input_offset]); assert(':' == colon_ptr[0]); hoedown_buffer_init(&link, 1024, realloc, free, free); { offset_delta = hoedown_autolink__url(&rewind, &link, colon_ptr, input_offset, input_len, 0); assert(strlen("://www.hoedown.org/index.html") == offset_delta); assert(4 == rewind); assert(hoedown_buffer_eqs(&link, "http://www.hoedown.org/index.html")); assert(rewind + offset_delta == link.size); assert(0 == strcmp((char *)(colon_ptr+offset_delta), ", got it?")); } hoedown_buffer_uninit(&link);
The basic structure of code processing Markdown is this:
#include <hoedown/buffer.h> #include <hoedown/document.h> #include <hoedown/html.h> void html_rend (const char * in_str, const char * ou_str) { hoedown_buffer B; hoedown_document * D; hoedown_renderer * R; hoedown_buffer_init(&B, 1024, realloc, free, free); R = hoedown_html_renderer_new(0, 0); D = hoedown_document_new(R, 0, 16); { hoedown_document_render(D, &B, (const uint8_t *)in_str, strlen(in_str)); /* Here the HTML output is in B.*/ } hoedown_document_free(D); hoedown_html_renderer_free(R); hoedown_buffer_uninit(&B); }
and it can be used as follows:
char * in_str = "Hello World!"; char * ou_str = "<p>Hello World!</p>\n"; html_rend (in_str, ou_str);
The definitions of the document API are in the header file hoedown/document.h.
Type of structure used to represent the processing of a Markdown document. Instances of this type are allocated with
hoedown_document_new()
and released withhoedown_document_free()
.
Type of structure used to represent custom state of Markdown processing. It has the following public fields:
void * opaque
- A pointer that can be used for anything by client code.
Pointers to a structure of this type are handed as last argument to all the document rendering callbacks registered in instances of
hoedown_renderer
. In particular: the callbackdoc_header
can be used to initialise this state, and the callbackdoc_footer
can be used to finalise it. Custom renderer data structure, for details on the renderer.
Allocate a new document processor instance.
The renderer argument must be a pointer to an renderer instance, for example the built–in HTML renderers created by
hoedown_html_renderer_new()
andhoedown_html_toc_renderer_new()
(see lib html renderer).The argument extensions must be an OR combination of the enumeration constants
hoedown_extensions
(see Markdown processing extensions).The argument max_nesting represents the maximum nesting level of Markdown blocks. This limit exists for security purposes: it avoids malicious input to cause runaways of nested function calls in an attempt to cripple the internal state of the parser. Most likely, setting this operand to 16 is fine for all the legitimate input documents.
Deallocate a document processor instance.
Render regular Markdown or inline Markdown using the document processor.
The argument doc must reference an already initialised Markdown document renderer. The argument ob must reference an already initialised buffer to which the output will be appended. The argument data must reference an array of size octets containing the input Markdown text.
The input Markdown text is processed with the following rules:
- The input text may optionally start with a UTF-8 Byte Order Mark (BOM), which is the sequence of 3 octets: ‘0xEF’, ‘0xBB’, ‘0xBF’. If present: this BOM is just skipped.
- Lines in the input text are terminated by ‘\n’ or ‘\r\n’; such line endings are normalised in the output into a single ‘\n’ character.
- Tabulation characters ‘\t’ (Unicode code point ‘0x09’) are expanded to 4 spaces in the output.
The definitions of the document API are in the header file hoedown/document.h.
Enumeration typedef representing a combination of extensions to Markdown text processing. It defines the following constants:
- Block–level extensions:
- Span–level extensions:
- Other flags:
- Negative flags:
An OR combination of the following constants:
HOEDOWN_EXT_TABLES HOEDOWN_EXT_FENCED_CODE HOEDOWN_EXT_FOOTNOTES
An OR combination of the following constants:
HOEDOWN_EXT_AUTOLINK HOEDOWN_EXT_STRIKETHROUGH HOEDOWN_EXT_UNDERLINE HOEDOWN_EXT_HIGHLIGHT HOEDOWN_EXT_QUOTE HOEDOWN_EXT_SUPERSCRIPT HOEDOWN_EXT_MATH
An OR combination of the following constants:
HOEDOWN_EXT_NO_INTRA_EMPHASIS HOEDOWN_EXT_SPACE_HEADERS HOEDOWN_EXT_MATH_EXPLICIT
An OR combination of the following constants:
HOEDOWN_EXT_DISABLE_INDENTED_CODE
The definitions of the document API are in the header file hoedown/document.h.
Data structure typedef used to represent output renderers. Instances of this type must be dynamically allocated; the structure definition contains both public fields and private fields. When a struct field is unused: it must be set to
NULL
.The following fields are defined:
blockcode
- Block level callback; when set to
NULL
the block is skipped.blockquote
- Block level callback; when set to
NULL
the block is skipped.header
- Block level callback; when set to
NULL
the block is skipped.hrule
- Block level callback; when set to
NULL
the block is skipped.list
- Block level callback; when set to
NULL
the block is skipped.listitem
- Block level callback; when set to
NULL
the block is skipped.paragraph
- Block level callback; when set to
NULL
the block is skipped.table
- Block level callback; when set to
NULL
the block is skipped.table_header
- Block level callback; when set to
NULL
the block is skipped.table_body
- Block level callback; when set to
NULL
the block is skipped.table_row
- Block level callback; when set to
NULL
the block is skipped.table_cell
- Block level callback; when set to
NULL
the block is skipped.footnotes
- Block level callback; when set to
NULL
the block is skipped.footnote_def
- Block level callback; when set to
NULL
the block is skipped.blockhtml
- Block level callback; when set to
NULL
the block is skipped.autolink
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.codespan
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.double_emphasis
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.emphasis
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.underline
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.highlight
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.quote
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.image
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.linebreak
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.link
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.triple_emphasis
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.strikethrough
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.superscript
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.footnote_ref
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.math
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.raw_html
- Span level callback; when set to
NULL
or set to a function pointer returning0
: the span is printed verbatim.entity
- Low level callback; when set to
NULL
: copy the input directly into the output.normal_text
- Low level callback; when set to
NULL
: copy the input directly into the output.doc_header
- When set to
NULL
: no document header is generated.doc_footer
- When set to
NULL
: no document footer is generated.
The definitions of the document API are in the header file hoedown/document.h.
Callbacks used to render code blocks:
are set in the field
blockcode
of structures of typehowdown_renderer
.Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Callbacks used to render ???:
are set in the field
blockquote
of structures of typehowdown_renderer
.Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Enumeration typedef for constants describing numbered lists. It defines the following constants:
HOEDOWN_LIST_ORDERED
HOEDOWN_LI_BLOCK
- ‘<li>’ containing block data.
Bitwise OR compositions of these constants are used as argument to the
list
andlistitem
renderer callbacks.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Enumeration typedef for constants describing tables. It defines the following constants:
HOEDOWN_TABLE_ALIGN_LEFT
HOEDOWN_TABLE_ALIGN_RIGHT
HOEDOWN_TABLE_ALIGN_CENTER
HOEDOWN_TABLE_ALIGNMASK
HOEDOWN_TABLE_HEADER
Bitwise OR compositions of these constants are used as argument to the
table_cell
renderer callback.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Enumeration typedef for constants describing tables. It defines the following constants:
Bitwise OR compositions of these constants are used as argument to the
autolink
renderer callback.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Output text must be appended to the output buffer ob. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Signature of callback functions used to render document headers; this callback is called before processing the input document. When the corresponding field in the
hoedown_renderer
is set toNULL
: no document footer is generated.Output text must be appended to the output buffer ob. The argument inline_render is true if this callback has been called while rendering an inline Markdown document; otherwise it is false. The pointer data references a custom rendering data.
The definitions of the document API are in the header file hoedown/document.h.
Signature of callback functions used to render document footers; this callback is called after processing the input document. When the corresponding field in the
hoedown_renderer
is set toNULL
: no document footer is generated.Output text must be appended to the output buffer ob. The argument inline_render is true if this callback has been called while rendering an inline Markdown document; otherwise it is false. The pointer data references a custom rendering data.
For examples of using the built–in HTML renderer HTML rendering examples.
The basic structure of code using the built–in HTML renderer is this:
void html_rend (const char * in_str, const char * ou_str) { hoedown_buffer B; hoedown_document * D; hoedown_renderer * R; hoedown_buffer_init(&B, 1024, realloc, free, free); R = hoedown_html_renderer_new(0, 0); D = hoedown_document_new(R, 0, 16); { hoedown_document_render(D, &B, (const uint8_t *)in_str, strlen(in_str)); assert(hoedown_buffer_eqs(&B, ou_str)); } hoedown_document_free(D); hoedown_html_renderer_free(R); hoedown_buffer_uninit(&B); }
and it can be used as follows:
/* Simple text. */ { char * in_str = "Hello World!"; char * ou_str = "<p>Hello World!</p>\n"; html_rend (in_str, ou_str); } /* Code markup. */ { char * in_str = "```Hello World!```"; char * ou_str = "<p><code>Hello World!</code></p>\n"; html_rend (in_str, ou_str); } /* Emphasis markup. */ { char * in_str = "*Hello World!*"; char * ou_str = "<p><em>Hello World!</em></p>\n"; html_rend (in_str, ou_str); } /* Emphasis markup. */ { char * in_str = "[Hello World!]()"; char * ou_str = \ "<p><a href=\"http://localhost/\">Hello World!</a></p>\n"; html_rend (in_str, ou_str); }
The definitions of the HTML generation API are in the header file hoedown/html.h.
Enumeration typedef used to configure the HTML renderer. It defines the following symbols:
Allocate a regular HTML renderer.
The argument nesting_level is the maximum header nesting level to include in the table of contents: when set to ‘1’ only the top headers are included (‘<h1>’); when set to ‘2’ only the top headers and the subheaders are included (‘<h1>’ and ‘<h2>’); and so on. Here “inclusion in the table of contents” means that ‘<h1>’ and similar markups are generated with the anchor:
<h1 id="toc_0">Heading</h1>so that the table of contents can reference them using the fragment identifier:
<a href="#toc_0">Heading</a>
Like
hoedown_html_renderer_new()
, but the returned renderer produces the “Table of Contents” rather than a normal document.The argument nesting_level is the maximum header nesting level to include in the table of contents: when set to ‘1’ only the top headers are included (‘<h1>’); when set to ‘2’ only the top headers and the subheaders are included (‘<h1>’ and ‘<h2>’); and so on.
We must be careful to generate a table of contents with nesting_level less than or equal to the value used when generating the full HTML document.
Rendering tables of contents, for examples of generating table of contents.
Deallocate an HTML renderer.
The definitions of the HTML generation API are in the header file hoedown/html.h.
Take the memory block referenced by data, containing size octets, and process it as HTML text; the resulting output is appended to the buffer ob.
Translate plain ASCII punctuation characters into “smart” typographic punctuation HTML entities. SmartyPants performs the following transformations:
- Straight quotes into “curly” quote HTML entities. The input text:
<p>"Hello" 'World'!</p>is converted to:
<p>“Hello” ‘World’!</p>- Backticks–style quotes into curly quote HTML entities. The input text:
<p>``Hello World!''</p>is converted to:
<p>“Hello World!”</p>- Dashes (‘--’ and ‘---’) into en- and em-dash entities. The input text:
<p>Trouble--maker---that is what you are!</p>is converted to:
<p>Trouble–maker—that is what you are!</p>- Three consecutive dots (‘...’) into an ellipsis entity.
The definitions of the HTML generation API are in the header file hoedown/html.h.
Enumeration type definitions used to qualify HTML markups. It includes the following symbols:
Check if data starts with a specific HTML markup whose name is tagname; return the markup type or ‘OEDOWN_HTML_TAG_NONE’ if the text is not a markup.
static const char * str = "Hello World!"; assert(HOEDOWN_HTML_TAG_NONE == \ hoedown_html_is_tag((const uint8_t *) str, strlen(str), "p")); static const char * str = "<p>Hello World!</p>"; assert(HOEDOWN_HTML_TAG_OPEN == \ hoedown_html_is_tag((const uint8_t *) str, strlen(str), "p")); static const char * str = "</p><p>Hello World!</p>"; assert(HOEDOWN_HTML_TAG_CLOSE == \ hoedown_html_is_tag((const uint8_t *) str, strlen(str), "p"));
The latest release of the repackaged Hoedown can be downloaded from:
the original package development takes place at:
development of the repackaging takes place at:
and as backup at:
Let's consider the following code that renders and prints a table of contents:
void print_buffer (hoedown_buffer * B) { fwrite(B->data, B->size, 1, stderr); fprintf(stderr, "\n"); } static void html_toc_rend (const char * in_str, int nesting_level) { hoedown_buffer B; hoedown_document * D; hoedown_renderer * R; hoedown_buffer_init(&B, 1024, realloc, free, free); R = hoedown_html_toc_renderer_new(nesting_level); D = hoedown_document_new(R, 0, 16); { hoedown_document_render(D, &B, (const uint8_t *)in_str, strlen(in_str)); print_buffer(&B); } hoedown_document_free(D); hoedown_html_renderer_free(R); hoedown_buffer_uninit(&B); }
Let's see what it generates:
static const char * in_str = "\ Heading1\n\ ========\n\ \n\ Subheading11\n\ ------------\n\ \n\ Subheading21\n\ ------------\n\ \n\ Heading2\n\ ========\n\ \n\ Subheading21\n\ ------------\n\ \n\ Subheading22\n\ ------------\n\ "; html_toc_rend (in_str, 3);
prints:
<ul> <li> <a href=#toc_0>Heading1</a> <ul> <li> <a href=#toc_1>Subheading11</a> </li> <li> <a href=#toc_2>Subheading21</a> </li> </ul> </li> <li> <a href=#toc_3>Heading2</a> <ul> <li> <a href=#toc_4>Subheading21</a> </li> <li> <a href=#toc_5>Subheading22</a> </li> </ul> </li> </ul>
static const char * in_str = "\ # Heading1\n\ \n\ ## Subheading11\n\ \n\ ## Subheading21\n\ \n\ # Heading2\n\ \n\ ## Subheading21\n\ \n\ ## Subheading22\n\ "; html_toc_rend (in_str, 3);
prints:
<ul> <li> <a href=#toc_0>Heading1</a> <ul> <li> <a href=#toc_1>Subheading11</a> </li> <li> <a href=#toc_2>Subheading21</a> </li> </ul> </li> <li> <a href=#toc_3>Heading2</a> <ul> <li> <a href=#toc_4>Subheading21</a> </li> <li> <a href=#toc_5>Subheading22</a> </li> </ul> </li> </ul>
static const char * in_str = "\ # Heading1\n\ \n\ ## Subheading11\n\ \n\ ## Subheading21\n\ \n\ # Heading2\n\ \n\ ## Subheading21\n\ \n\ ## Subheading22\n\ "; html_toc_rend (in_str, 1);
and it prints:
<ul> <li> <a href=#toc_0>Heading1</a> </li> <li> <a href=#toc_1>Heading2</a> </li> </ul>
HOEDOWN_AUTOLINK_SHORT_DOMAINS
: lib autolinkHOEDOWN_AUTOLINK_EMAIL
: lib document renderer autolinkHOEDOWN_AUTOLINK_NONE
: lib document renderer autolinkHOEDOWN_AUTOLINK_NORMAL
: lib document renderer autolinkHOEDOWN_EXT_AUTOLINK
: lib document extHOEDOWN_EXT_DISABLE_INDENTED_CODE
: lib document extHOEDOWN_EXT_FENCED_CODE
: lib document extHOEDOWN_EXT_FOOTNOTES
: lib document extHOEDOWN_EXT_HIGHLIGHT
: lib document extHOEDOWN_EXT_MATH
: lib document extHOEDOWN_EXT_MATH_EXPLICIT
: lib document extHOEDOWN_EXT_NO_INTRA_EMPHASIS
: lib document extHOEDOWN_EXT_QUOTE
: lib document extHOEDOWN_EXT_SPACE_HEADERS
: lib document extHOEDOWN_EXT_STRIKETHROUGH
: lib document extHOEDOWN_EXT_SUPERSCRIPT
: lib document extHOEDOWN_EXT_TABLES
: lib document extHOEDOWN_EXT_UNDERLINE
: lib document extHOEDOWN_HTML_ESCAPE
: lib html rendererHOEDOWN_HTML_HARD_WRAP
: lib html rendererHOEDOWN_HTML_SKIP_HTML
: lib html rendererHOEDOWN_HTML_TAG_CLOSE
: lib html miscHOEDOWN_HTML_TAG_OPEN
: lib html miscHOEDOWN_HTML_USE_XHTML
: lib html rendererHOEDOWN_TABLE_ALIGN_CENTER
: lib document renderer tableHOEDOWN_TABLE_ALIGN_LEFT
: lib document renderer tableHOEDOWN_TABLE_ALIGN_RIGHT
: lib document renderer tableHOEDOWN_TABLE_ALIGNMASK
: lib document renderer tableHOEDOWN_TABLE_HEADER
: lib document renderer tableOEDOWN_HTML_TAG_NONE
: lib html miscHOEDOWN_AUTOLINK_EMAIL
, enumeration constant: lib document renderer autolinkHOEDOWN_AUTOLINK_NONE
, enumeration constant: lib document renderer autolinkHOEDOWN_AUTOLINK_NORMAL
, enumeration constant: lib document renderer autolinkHOEDOWN_AUTOLINK_SHORT_DOMAINS
, enum constant: lib autolinkHOEDOWN_EXT_AUTOLINK
, enumeration constant: lib document extHOEDOWN_EXT_DISABLE_INDENTED_CODE
, enumeration constant: lib document extHOEDOWN_EXT_FENCED_CODE
, enumeration constant: lib document extHOEDOWN_EXT_FOOTNOTES
, enumeration constant: lib document extHOEDOWN_EXT_HIGHLIGHT
, enumeration constant: lib document extHOEDOWN_EXT_MATH
, enumeration constant: lib document extHOEDOWN_EXT_MATH_EXPLICIT
, enumeration constant: lib document extHOEDOWN_EXT_NO_INTRA_EMPHASIS
, enumeration constant: lib document extHOEDOWN_EXT_QUOTE
, enumeration constant: lib document extHOEDOWN_EXT_SPACE_HEADERS
, enumeration constant: lib document extHOEDOWN_EXT_STRIKETHROUGH
, enumeration constant: lib document extHOEDOWN_EXT_SUPERSCRIPT
, enumeration constant: lib document extHOEDOWN_EXT_TABLES
, enumeration constant: lib document extHOEDOWN_EXT_UNDERLINE
, enumeration constant: lib document extHOEDOWN_HTML_ESCAPE
, enumeration constant: lib html rendererHOEDOWN_HTML_HARD_WRAP
, enumeration constant: lib html rendererHOEDOWN_HTML_SKIP_HTML
, enumeration constant: lib html rendererHOEDOWN_HTML_TAG_CLOSE
, enumeration constant: lib html miscHOEDOWN_HTML_TAG_OPEN,
, enumeration constant: lib html miscHOEDOWN_HTML_USE_XHTML
, enumeration constant: lib html rendererHOEDOWN_TABLE_ALIGN_CENTER
, enumeration constant: lib document renderer tableHOEDOWN_TABLE_ALIGN_LEFT
, enumeration constant: lib document renderer tableHOEDOWN_TABLE_ALIGN_RIGHT
, enumeration constant: lib document renderer tableHOEDOWN_TABLE_ALIGNMASK
, enumeration constant: lib document renderer tableHOEDOWN_TABLE_HEADER
, enumeration constant: lib document renderer tableOEDOWN_HTML_TAG_NONE
, enumeration constant: lib html miscautolink
: lib document renderer autolinkblockcode
: lib document renderer blockcodeblockhtml
: lib document renderer blockhtmlblockquote
: lib document renderer blockquotecodespan
: lib document renderer codespandoc_footer
: lib document renderer doc_footerdoc_header
: lib document renderer doc_headerdouble_emphasis
: lib document renderer double_emphasisemphasis
: lib document renderer emphasisentity
: lib document renderer entityfootnote_def
: lib document renderer footnote_deffootnote_ref
: lib document renderer footnote_reffootnotes
: lib document renderer footnotesheader
: lib document renderer headerhighlight
: lib document renderer highlighthoedown_autolink__email
: lib autolinkhoedown_autolink__url
: lib autolinkhoedown_autolink__www
: lib autolinkhoedown_autolink_is_safe
: lib autolinkHOEDOWN_BUFEQSL
: lib buffers comparhoedown_buffer_cstr
: lib buffers mischoedown_buffer_eq
: lib buffers comparhoedown_buffer_eqs
: lib buffers comparhoedown_buffer_free
: lib buffers structhoedown_buffer_grow
: lib buffers structhoedown_buffer_init
: lib buffers structhoedown_buffer_new
: lib buffers structhoedown_buffer_prefix
: lib buffers comparhoedown_buffer_printf
: lib buffers mischoedown_buffer_put
: lib buffers appendhoedown_buffer_put_utf8
: lib buffers appendhoedown_buffer_putc
: lib buffers appendhoedown_buffer_putf
: lib buffers appendhoedown_buffer_puts
: lib buffers appendhoedown_buffer_reset
: lib buffers structhoedown_buffer_set
: lib buffers sethoedown_buffer_sets
: lib buffers sethoedown_buffer_slurp
: lib buffers mischoedown_buffer_uninit
: lib buffers structHOEDOWN_BUFPUTSL
: lib buffers appendHOEDOWN_BUFSETSL
: lib buffers sethoedown_calloc
: lib buffers memoryhoedown_document_free
: lib document apihoedown_document_new
: lib document apihoedown_document_render
: lib document apihoedown_document_render_inline
: lib document apihoedown_escape_href
: lib escapehoedown_escape_html
: lib escapehoedown_html_is_tag
: lib html mischoedown_html_renderer_free
: lib html rendererhoedown_html_renderer_new
: lib html rendererhoedown_html_smartypants
: lib html smartypantshoedown_html_toc_renderer_new
: lib html rendererhoedown_malloc
: lib buffers memoryhoedown_realloc
: lib buffers memoryhoedown_stack_grow
: lib stacks structhoedown_stack_init
: lib stacks structhoedown_stack_pop
: lib stacks opshoedown_stack_push
: lib stacks opshoedown_stack_top
: lib stacks opshoedown_stack_uninit
: lib stacks structhoedown_version
: lib versionhrule
: lib document renderer hruleimage
: lib document renderer imagelinebreak
: lib document renderer linebreaklink
: lib document renderer linklist
: lib document renderer listlistitem
: lib document renderer listitemmath
: lib document renderer mathnormal_text
: lib document renderer normal_textparagraph
: lib document renderer paragraphquote
: lib document renderer quoteraw_html
: lib document renderer raw_htmlstrikethrough
: lib document renderer strikethroughsuperscript
: lib document renderer superscripttable
: lib document renderer tabletable_body
: lib document renderer table_bodytable_cell
: lib document renderer table_celltable_header
: lib document renderer table_headertable_row
: lib document renderer table_rowtriple_emphasis
: lib document renderer triple_emphasisunderline
: lib document renderer underlineHOEDOWN_EXT_BLOCK
: lib document extHOEDOWN_EXT_FLAGS
: lib document extHOEDOWN_EXT_NEGATIVE
: lib document extHOEDOWN_EXT_SPAN
: lib document extHOEDOWN_MAJOR
: lib versionHOEDOWN_MINOR
: lib versionHOEDOWN_REVISION
: lib versionHOEDOWN_VERSION
: lib versionhoedown_autolink_flags
: lib autolinkhoedown_autolink_type
: lib document renderer autolinkhoedown_buffer
: lib buffers structhoedown_document
: lib document apihoedown_extensions
: lib document exthoedown_free_callback
: lib buffers memoryhoedown_html_flags
: lib html rendererhoedown_html_tag
: lib html mischoedown_list_flags
: lib document renderer listhoedown_realloc_callback
: lib buffers memoryhoedown_renderer
: lib document renderer structhoedown_renderer_data
: lib document apihoedown_stack
: lib stacks structhoedown_table_flags
: lib document renderer table