summaryrefslogtreecommitdiff
path: root/man/man3
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-19 21:15:43 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-19 21:18:02 -0800
commitb0a6c472f881a3e0a7b61722fb6fddbcc39e5139 (patch)
tree511cc8147fef48a302128eae05af1ff37c21d092 /man/man3
parent774ac507fc7e86c6fe0d7b16a3c1abaed4849fab (diff)
Changed API for CUSTOM_BLOCK and CUSTOM_INLINE.
Instead of using their `as.literal` content, we now give each custom node *two* literal fields, one to be printed on entering the node (before rendering the children, if any), the other on exiting (after rendering children). This gives us the flexibility to have custom nodes with children.
Diffstat (limited to 'man/man3')
-rw-r--r--man/man3/cmark.334
1 files changed, 30 insertions, 4 deletions
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
index 2f79781..9754e78 100644
--- a/man/man3/cmark.3
+++ b/man/man3/cmark.3
@@ -112,8 +112,6 @@ are nodes of type:
.IP \[bu] 2
CMARK_NODE_HTML
.IP \[bu] 2
-CMARK_NODE_CUSTOM_BLOCK
-.IP \[bu] 2
CMARK_NODE_HRULE
.IP \[bu] 2
CMARK_NODE_CODE_BLOCK
@@ -127,8 +125,6 @@ CMARK_NODE_LINEBREAK
CMARK_NODE_CODE
.IP \[bu] 2
CMARK_NODE_INLINE_HTML
-.IP \[bu] 2
-CMARK_NODE_CUSTOM_INLINE
.PP
Nodes must only be modified after an \f[C]EXIT\f[] event, or an
\f[C]ENTER\f[] event for leaf nodes.
@@ -331,6 +327,36 @@ Sets the title of a link or image \f[I]node\f[]. Returns 1 on success, 0
on failure.
.PP
+\fIconst char *\f[] \fBcmark_node_get_on_enter\f[](\fIcmark_node *node\f[])
+
+.PP
+Gets the literal "on enter" text for a custom \f[I]node\f[], or NULL if
+none.
+
+.PP
+\fIint\f[] \fBcmark_node_set_on_enter\f[](\fIcmark_node *node\f[], \fIconst char *on_enter\f[])
+
+.PP
+Sets the literal text to render "on enter" for a custom \f[I]node\f[].
+Any children of the node will be rendered after this text. Returns 1 on
+success 0 on failure.
+
+.PP
+\fIconst char *\f[] \fBcmark_node_get_on_exit\f[](\fIcmark_node *node\f[])
+
+.PP
+Gets the literal "on exit" text for a custom \f[I]node\f[], or NULL if
+none.
+
+.PP
+\fIint\f[] \fBcmark_node_set_on_exit\f[](\fIcmark_node *node\f[], \fIconst char *on_exit\f[])
+
+.PP
+Sets the literal text to render "on exit" for a custom \f[I]node\f[].
+Any children of the node will be rendered before this text. Returns 1 on
+success 0 on failure.
+
+.PP
\fIint\f[] \fBcmark_node_get_start_line\f[](\fIcmark_node *node\f[])
.PP