summaryrefslogtreecommitdiff
path: root/man/man3/cmark.3
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-30 14:38:11 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-30 14:38:11 -0800
commitba6419a0d64d020f0fb1ef0b7303bfd690ec8199 (patch)
treeafb3d78fc15fcb8c330c20f521ca90e9215deffa /man/man3/cmark.3
parentdbe7d3417f3201bffecd6bbf1be2f49691c28866 (diff)
More man page improvements.
Diffstat (limited to 'man/man3/cmark.3')
-rw-r--r--man/man3/cmark.360
1 files changed, 55 insertions, 5 deletions
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
index fcd1c28..4c0581f 100644
--- a/man/man3/cmark.3
+++ b/man/man3/cmark.3
@@ -7,25 +7,27 @@
.SH SIMPLE INTERFACE
.nf
+\f[C]
.RS 0n
#define CMARK_VERSION "0.1"
.RE
+\f[]
.fi
+.PP
Current version of library.
\fIchar *\fR \fBcmark_markdown_to_html\fR(\fIconst char *text\fR, \fIint len\fR)
-Convert
-.Fa text
-(assumed to be a UTF-8 encoded string with length
-.Fa len )
-from CommonMark Markdown to HTML, returning a null-terminated,
+.PP
+Convert \fItext\fR (assumed to be a UTF-8 encoded string with length
+\fIlen\fR from CommonMark Markdown to HTML, returning a null-terminated,
UTF-8-encoded string.
.SH NODE STRUCTURE
.nf
+\f[C]
.RS 0n
typedef enum {
/* Block */
@@ -58,10 +60,13 @@ typedef enum {
CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE,
} cmark_node_type;
.RE
+\f[]
.fi
+.PP
.nf
+\f[C]
.RS 0n
typedef enum {
CMARK_NO_LIST,
@@ -69,155 +74,200 @@ typedef enum {
CMARK_ORDERED_LIST
} cmark_list_type;
.RE
+\f[]
.fi
+.PP
.nf
+\f[C]
.RS 0n
typedef enum {
CMARK_PERIOD_DELIM,
CMARK_PAREN_DELIM
} cmark_delim_type;
.RE
+\f[]
.fi
+.PP
.SH CREATING AND DESTROYING NODES
\fIcmark_node*\fR \fBcmark_node_new\fR(\fIcmark_node_type type\fR)
+.PP
\fIvoid\fR \fBcmark_node_free\fR(\fIcmark_node *node\fR)
+.PP
\fIcmark_node*\fR \fBcmark_node_next\fR(\fIcmark_node *node\fR)
+.PP
.SH TREE TRAVERSAL
\fIcmark_node*\fR \fBcmark_node_previous\fR(\fIcmark_node *node\fR)
+.PP
\fIcmark_node*\fR \fBcmark_node_parent\fR(\fIcmark_node *node\fR)
+.PP
\fIcmark_node*\fR \fBcmark_node_first_child\fR(\fIcmark_node *node\fR)
+.PP
\fIcmark_node*\fR \fBcmark_node_last_child\fR(\fIcmark_node *node\fR)
+.PP
.SH ACCESSORS
\fIcmark_node_type\fR \fBcmark_node_get_type\fR(\fIcmark_node *node\fR)
+.PP
\fIconst char*\fR \fBcmark_node_get_string_content\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_string_content\fR(\fIcmark_node *node\fR, \fIconst char *content\fR)
+.PP
\fIint\fR \fBcmark_node_get_header_level\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_header_level\fR(\fIcmark_node *node\fR, \fIint level\fR)
+.PP
\fIcmark_list_type\fR \fBcmark_node_get_list_type\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_list_type\fR(\fIcmark_node *node\fR, \fIcmark_list_type type\fR)
+.PP
\fIint\fR \fBcmark_node_get_list_start\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_list_start\fR(\fIcmark_node *node\fR, \fIint start\fR)
+.PP
\fIint\fR \fBcmark_node_get_list_tight\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_list_tight\fR(\fIcmark_node *node\fR, \fIint tight\fR)
+.PP
\fIconst char*\fR \fBcmark_node_get_fence_info\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_fence_info\fR(\fIcmark_node *node\fR, \fIconst char *info\fR)
+.PP
\fIconst char*\fR \fBcmark_node_get_url\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_url\fR(\fIcmark_node *node\fR, \fIconst char *url\fR)
+.PP
\fIconst char*\fR \fBcmark_node_get_title\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_set_title\fR(\fIcmark_node *node\fR, \fIconst char *title\fR)
+.PP
\fIint\fR \fBcmark_node_get_start_line\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_get_start_column\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_get_end_line\fR(\fIcmark_node *node\fR)
+.PP
.SH TREE MANIPULATION
\fIvoid\fR \fBcmark_node_unlink\fR(\fIcmark_node *node\fR)
+.PP
\fIint\fR \fBcmark_node_insert_before\fR(\fIcmark_node *node\fR, \fIcmark_node *sibling\fR)
+.PP
\fIint\fR \fBcmark_node_insert_after\fR(\fIcmark_node *node\fR, \fIcmark_node *sibling\fR)
+.PP
\fIint\fR \fBcmark_node_prepend_child\fR(\fIcmark_node *node\fR, \fIcmark_node *child\fR)
+.PP
\fIint\fR \fBcmark_node_append_child\fR(\fIcmark_node *node\fR, \fIcmark_node *child\fR)
+.PP
.SH PARSING
\fIcmark_parser *\fR \fBcmark_parser_new\fR(\fI\fR)
+.PP
\fIvoid\fR \fBcmark_parser_free\fR(\fIcmark_parser *parser\fR)
+.PP
\fIcmark_node *\fR \fBcmark_parser_finish\fR(\fIcmark_parser *parser\fR)
+.PP
\fIvoid\fR \fBcmark_parser_feed\fR(\fIcmark_parser *parser\fR, \fIconst char *buffer\fR, \fIsize_t len\fR)
+.PP
\fIcmark_node *\fR \fBcmark_parse_document\fR(\fIconst char *buffer\fR, \fIsize_t len\fR)
+.PP
\fIcmark_node *\fR \fBcmark_parse_file\fR(\fIFILE *f\fR)
+.PP
.SH RENDERING
\fIchar *\fR \fBcmark_render_ast\fR(\fIcmark_node *root\fR)
+.PP
\fIchar *\fR \fBcmark_render_html\fR(\fIcmark_node *root\fR)
+.PP
.SH AUTHORS