summaryrefslogtreecommitdiff
path: root/src/document.h
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-03 20:48:08 -0400
committerAlex Crichton <alex@alexcrichton.com>2014-09-03 20:48:08 -0400
commit794d91b37020242446c53713c7ce0c09b33b5f0c (patch)
tree859326b963bf282568ebbef972e865407e58c822 /src/document.h
parent238c4d57cce10d33b05cf52a91fc62a09f31ffbb (diff)
parent7e5ba30c23f2a455cc041a8d1307d3b75e8eec1a (diff)
downloadrust-hoedown-794d91b37020242446c53713c7ce0c09b33b5f0c.tar.gz
Merge pull request #1 from hoedown/master
Update to latest master of Hoedown to get Mathjax support
Diffstat (limited to 'src/document.h')
-rw-r--r--src/document.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/document.h b/src/document.h
index d310933..4547972 100644
--- a/src/document.h
+++ b/src/document.h
@@ -27,11 +27,13 @@ enum hoedown_extensions {
HOEDOWN_EXT_HIGHLIGHT = (1 << 6),
HOEDOWN_EXT_QUOTE = (1 << 7),
HOEDOWN_EXT_SUPERSCRIPT = (1 << 8),
+ HOEDOWN_EXT_MATH = (1 << 13),
/* other flags */
HOEDOWN_EXT_LAX_SPACING = (1 << 9),
HOEDOWN_EXT_NO_INTRA_EMPHASIS = (1 << 10),
HOEDOWN_EXT_SPACE_HEADERS = (1 << 11),
+ HOEDOWN_EXT_MATH_EXPLICIT = (1 << 14),
/* negative flags */
HOEDOWN_EXT_DISABLE_INDENTED_CODE = (1 << 12)
@@ -48,12 +50,14 @@ enum hoedown_extensions {
HOEDOWN_EXT_UNDERLINE |\
HOEDOWN_EXT_HIGHLIGHT |\
HOEDOWN_EXT_QUOTE |\
- HOEDOWN_EXT_SUPERSCRIPT )
+ HOEDOWN_EXT_SUPERSCRIPT |\
+ HOEDOWN_EXT_MATH )
#define HOEDOWN_EXT_FLAGS (\
HOEDOWN_EXT_LAX_SPACING |\
HOEDOWN_EXT_NO_INTRA_EMPHASIS |\
- HOEDOWN_EXT_SPACE_HEADERS )
+ HOEDOWN_EXT_SPACE_HEADERS |\
+ HOEDOWN_EXT_MATH_EXPLICIT )
#define HOEDOWN_EXT_NEGATIVE (\
HOEDOWN_EXT_DISABLE_INDENTED_CODE )
@@ -61,7 +65,7 @@ enum hoedown_extensions {
/* list/listitem flags */
enum hoedown_listflags {
HOEDOWN_LIST_ORDERED = (1 << 0),
- HOEDOWN_LI_BLOCK = (1 << 1), /* <li> containing block data */
+ HOEDOWN_LI_BLOCK = (1 << 1) /* <li> containing block data */
};
enum hoedown_tableflags {
@@ -119,6 +123,7 @@ struct hoedown_renderer {
int (*strikethrough)(hoedown_buffer *ob, const hoedown_buffer *text, void *opaque);
int (*superscript)(hoedown_buffer *ob, const hoedown_buffer *text, void *opaque);
int (*footnote_ref)(hoedown_buffer *ob, unsigned int num, void *opaque);
+ int (*math)(hoedown_buffer *ob, const hoedown_buffer *text, int displaymode, void *opaque);
/* low level callbacks - NULL copies input directly into the output */
void (*entity)(hoedown_buffer *ob, const hoedown_buffer *entity, void *opaque);
@@ -149,6 +154,9 @@ extern void
hoedown_document_render(hoedown_document *doc, hoedown_buffer *ob, const uint8_t *document, size_t doc_size);
extern void
+hoedown_document_render_inline(hoedown_document *doc, hoedown_buffer *ob, const uint8_t *document, size_t doc_size);
+
+extern void
hoedown_document_free(hoedown_document *doc);
#ifdef __cplusplus