#include "latex.h"
#include "beamer.h"
#include "parser.h"
+#include "stack.h"
#define print(x) d_string_append(out, x)
#define print_const(x) d_string_append_c_array(out, x, sizeof(x) - 1)
#include "html.h"
#include "i18n.h"
#include "miniz.h"
+#include "stack.h"
#include "uuid.h"
#include "writer.h"
#include "zip.h"
#include "html.h"
#include "i18n.h"
#include "libMultiMarkdown.h"
+#include "mmd.h"
#include "parser.h"
#include "token.h"
#include "scanners.h"
+#include "stack.h"
#include "writer.h"
break;
case PAIR_CRITIC_ADD:
+ stack_push(scratch->critic_stack, t);
// Ignore if we're rejecting
if (scratch->extensions & EXT_CRITIC_REJECT) {
break;
case PAIR_CRITIC_DEL:
+ stack_push(scratch->critic_stack, t);
// Ignore if we're accepting
if (scratch->extensions & EXT_CRITIC_ACCEPT) {
break;
case PAIR_CRITIC_COM:
+ stack_push(scratch->critic_stack, t);
// Ignore if we're rejecting or accepting
if ((scratch->extensions & EXT_CRITIC_REJECT) ||
break;
case PAIR_CRITIC_SUB_DEL:
+ stack_push(scratch->critic_stack, t);
+
if ((scratch->extensions & EXT_CRITIC) &&
(t->next) &&
(t->next->type == PAIR_CRITIC_SUB_ADD)) {
break;
case PAIR_CRITIC_SUB_ADD:
+ stack_push(scratch->critic_stack, t);
+
if ((scratch->extensions & EXT_CRITIC) &&
(t->prev) &&
(t->prev->type == PAIR_CRITIC_SUB_DEL)) {
#ifndef HTML_MULTIMARKDOWN_H
#define HTML_MULTIMARKDOWN_H
-#include "d_string.h"
+typedef struct DString DString;
+
#include "token.h"
#include "writer.h"
#include <stdio.h>
#include <stdlib.h>
+#include "d_string.h"
#include "mmd.h"
#include "itmz-reader.h"
#include "itmz-lexer.h"
#include "itmz.h"
#include "parser.h"
+#include "stack.h"
#include "uuid.h"
#include "zip.h"
#include "latex.h"
#include "parser.h"
#include "scanners.h"
+#include "stack.h"
+
#define print(x) d_string_append(out, x)
#define print_const(x) d_string_append_c_array(out, x, sizeof(x) - 1)
e->quotes_lang = ENGLISH;
e->abbreviation_stack = stack_new(0);
+ e->critic_stack = stack_new(0);
e->citation_stack = stack_new(0);
e->definition_stack = stack_new(0);
e->footnote_stack = stack_new(0);
}
// Reset other stacks
+ e->critic_stack->size = 0;
e->definition_stack->size = 0;
e->header_stack->size = 0;
e->table_stack->size = 0;
// Takedown
stack_free(e->abbreviation_stack);
+ stack_free(e->critic_stack);
stack_free(e->citation_stack);
stack_free(e->footnote_stack);
stack_free(e->glossary_stack);
#ifndef MMD_MULTIMARKDOWN_H
#define MMD_MULTIMARKDOWN_H
-#include "d_string.h"
#include "libMultiMarkdown.h"
-#include "stack.h"
-#include "token.h"
-#include "token_pairs.h"
#include "uthash.h"
+typedef struct token_pair_engine toke_pair_engine;
#define kMaxParseRecursiveDepth 1000 //!< Maximum recursion depth when parsing -- to prevent stack overflow with "pathologic" input
bool allow_meta;
- token_pair_engine * pairings1;
- token_pair_engine * pairings2;
- token_pair_engine * pairings3;
- token_pair_engine * pairings4;
+ struct token_pair_engine * pairings1;
+ struct token_pair_engine * pairings2;
+ struct token_pair_engine * pairings3;
+ struct token_pair_engine * pairings4;
stack * abbreviation_stack;
stack * citation_stack;
+ stack * critic_stack;
stack * definition_stack;
stack * footnote_stack;
stack * glossary_stack;
struct asset {
char * url;
char * asset_path;
- UT_hash_handle hh;
+ struct UT_hash_handle hh;
};
typedef struct asset asset;
#include <string.h>
#include "char.h"
+#include "d_string.h"
#include "opendocument-content.h"
+#include "mmd.h"
#include "parser.h"
#include "scanners.h"
+#include "stack.h"
+#include "token.h"
#define print(x) d_string_append(out, x)
#include <stdio.h>
#include <stdlib.h>
+#include "d_string.h"
#include "mmd.h"
#include "opml-reader.h"
#include "opml-lexer.h"
#include "opml.h"
#include "parser.h"
+#include "stack.h"
+
#define print(x) d_string_append(out, x)
#define print_const(x) d_string_append_c_array(out, x, sizeof(x) - 1)
#include "libMultiMarkdown.h"
#include "mmd.h"
#include "parser.h"
+ #include "stack.h"
#include "token.h"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
#include "libMultiMarkdown.h"
#include "mmd.h"
#include "parser.h"
+ #include "stack.h"
#include "token.h"
}
#include "file.h"
#include "miniz.h"
+#include "stack.h"
#include "textbundle.h"
+#include "token.h"
#include "writer.h"
#include "zip.h"
#include "opml.h"
#include "parser.h"
#include "scanners.h"
+#include "stack.h"
#include "token.h"
#include "uuid.h"
#include "writer.h"
p->asset_hash = NULL;
p->store_assets = 0;
p->remember_assets = 0;
+
+ p->critic_stack = e->critic_stack;
}
return p;
#include "CuTest.h"
#endif
-#include "d_string.h"
+#include "libMultiMarkdown.h"
+#include "uthash.h"
+
+/*
+ #include "d_string.h"
#include "mmd.h"
#include "stack.h"
#include "token.h"
#include "uthash.h"
-
+*/
#define kMaxExportRecursiveDepth 1000 //!< Maximum recursion depth when exporting token tree -- to prevent stack overflow with "pathologic" input
#define kMaxTableColumns 48 //!< Maximum number of table columns for specifying alignment
+typedef struct asset asset;
+typedef struct stack stack;
+
typedef struct {
struct link * link_hash;
struct meta * meta_hash;
struct asset * asset_hash;
short store_assets;
short remember_assets;
+
+ stack * critic_stack;
} scratch_pad;