bluecloth 2.0.7-x86-mswin32 → 2.0.11pre158-x86-mswin32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +0 -0
- data/.gemtest +0 -0
- data/History.md +4 -0
- data/LICENSE +1 -1
- data/Manifest.txt +103 -0
- data/README.md +103 -0
- data/Rakefile +95 -301
- data/ext/VERSION +1 -1
- data/ext/bluecloth.c +69 -23
- data/ext/bluecloth.h +13 -2
- data/ext/config.h +13 -2
- data/ext/css.c +14 -5
- data/ext/cstring.h +4 -2
- data/ext/docheader.c +13 -7
- data/ext/emmatch.c +188 -0
- data/ext/extconf.rb +7 -9
- data/ext/generate.c +333 -293
- data/ext/html5.c +24 -0
- data/ext/markdown.c +326 -185
- data/ext/markdown.h +52 -29
- data/ext/mkdio.c +82 -41
- data/ext/mkdio.h +44 -23
- data/ext/resource.c +4 -2
- data/ext/setup.c +47 -0
- data/ext/tags.c +123 -0
- data/ext/tags.h +19 -0
- data/lib/1.8/bluecloth_ext.so +0 -0
- data/lib/1.9/bluecloth_ext.so +0 -0
- data/lib/bluecloth.rb +77 -42
- data/spec/bluecloth/101_changes_spec.rb +18 -21
- data/spec/bluecloth/TEMPLATE +36 -0
- data/spec/bluecloth/autolinks_spec.rb +4 -7
- data/spec/bluecloth/blockquotes_spec.rb +20 -23
- data/spec/bluecloth/code_spans_spec.rb +2 -5
- data/spec/bluecloth/emphasis_spec.rb +2 -5
- data/spec/bluecloth/entities_spec.rb +2 -5
- data/spec/bluecloth/hrules_spec.rb +2 -5
- data/spec/bluecloth/images_spec.rb +2 -5
- data/spec/bluecloth/inline_html_spec.rb +26 -66
- data/spec/bluecloth/links_spec.rb +1 -5
- data/spec/bluecloth/lists_spec.rb +2 -5
- data/spec/bluecloth/paragraphs_spec.rb +2 -5
- data/spec/bluecloth/titles_spec.rb +2 -5
- data/spec/bluecloth_spec.rb +36 -22
- data/spec/bugfix_spec.rb +90 -10
- data/spec/contributions_spec.rb +2 -3
- data/spec/discount_spec.rb +50 -10
- data/spec/lib/helpers.rb +18 -117
- data/spec/lib/matchers.rb +7 -18
- data/spec/markdowntest_spec.rb +3 -39
- metadata +257 -143
- metadata.gz.sig +0 -0
- data/ChangeLog +0 -387
- data/README +0 -81
- data/Rakefile.local +0 -41
- data/rake/191_compat.rb +0 -26
- data/rake/dependencies.rb +0 -76
- data/rake/helpers.rb +0 -435
- data/rake/hg.rb +0 -273
- data/rake/manual.rb +0 -782
- data/rake/packaging.rb +0 -123
- data/rake/publishing.rb +0 -274
- data/rake/rdoc.rb +0 -30
- data/rake/style.rb +0 -62
- data/rake/svn.rb +0 -668
- data/rake/testing.rb +0 -187
- data/rake/verifytask.rb +0 -64
data/ext/markdown.h
CHANGED
@@ -56,6 +56,17 @@ typedef struct block {
|
|
56
56
|
typedef STRING(block) Qblock;
|
57
57
|
|
58
58
|
|
59
|
+
typedef char* (*mkd_callback_t)(const char*, const int, void*);
|
60
|
+
typedef void (*mkd_free_t)(char*, void*);
|
61
|
+
|
62
|
+
typedef struct callback_data {
|
63
|
+
void *e_data; /* private data for callbacks */
|
64
|
+
mkd_callback_t e_url; /* url edit callback */
|
65
|
+
mkd_callback_t e_flags; /* extra href flags callback */
|
66
|
+
mkd_free_t e_free; /* edit/flags callback memory deallocator */
|
67
|
+
} Callback_data;
|
68
|
+
|
69
|
+
|
59
70
|
/* a magic markdown io thing holds all the data structures needed to
|
60
71
|
* do the backend processing of a markdown document
|
61
72
|
*/
|
@@ -65,23 +76,33 @@ typedef struct mmiot {
|
|
65
76
|
Qblock Q;
|
66
77
|
int isp;
|
67
78
|
STRING(Footnote) *footnotes;
|
68
|
-
|
69
|
-
#define
|
70
|
-
#define
|
71
|
-
#define
|
72
|
-
#define
|
73
|
-
#define
|
74
|
-
#define
|
75
|
-
#define
|
76
|
-
#define
|
77
|
-
#define
|
78
|
-
#define
|
79
|
-
#define
|
80
|
-
#define
|
81
|
-
#define
|
82
|
-
#define
|
83
|
-
#define
|
84
|
-
|
79
|
+
DWORD flags;
|
80
|
+
#define MKD_NOLINKS 0x00000001
|
81
|
+
#define MKD_NOIMAGE 0x00000002
|
82
|
+
#define MKD_NOPANTS 0x00000004
|
83
|
+
#define MKD_NOHTML 0x00000008
|
84
|
+
#define MKD_STRICT 0x00000010
|
85
|
+
#define MKD_TAGTEXT 0x00000020
|
86
|
+
#define MKD_NO_EXT 0x00000040
|
87
|
+
#define MKD_CDATA 0x00000080
|
88
|
+
#define MKD_NOSUPERSCRIPT 0x00000100
|
89
|
+
#define MKD_NORELAXED 0x00000200
|
90
|
+
#define MKD_NOTABLES 0x00000400
|
91
|
+
#define MKD_NOSTRIKETHROUGH 0x00000800
|
92
|
+
#define MKD_TOC 0x00001000
|
93
|
+
#define MKD_1_COMPAT 0x00002000
|
94
|
+
#define MKD_AUTOLINK 0x00004000
|
95
|
+
#define MKD_SAFELINK 0x00008000
|
96
|
+
#define MKD_NOHEADER 0x00010000
|
97
|
+
#define MKD_TABSTOP 0x00020000
|
98
|
+
#define MKD_NODIVQUOTE 0x00040000
|
99
|
+
#define MKD_NOALPHALIST 0x00080000
|
100
|
+
#define MKD_NODLIST 0x00100000
|
101
|
+
#define IS_LABEL 0x08000000
|
102
|
+
#define USER_FLAGS 0x0FFFFFFF
|
103
|
+
#define INPUT_MASK (MKD_NOHEADER|MKD_TABSTOP)
|
104
|
+
|
105
|
+
Callback_data *cb;
|
85
106
|
} MMIOT;
|
86
107
|
|
87
108
|
|
@@ -93,19 +114,23 @@ typedef struct mmiot {
|
|
93
114
|
* root of the linked list of Lines.
|
94
115
|
*/
|
95
116
|
typedef struct document {
|
96
|
-
|
117
|
+
int magic; /* "I AM VALID" magic number */
|
118
|
+
#define VALID_DOCUMENT 0x19600731
|
119
|
+
Line *title;
|
120
|
+
Line *author;
|
121
|
+
Line *date;
|
97
122
|
ANCHOR(Line) content; /* uncompiled text, not valid after compile() */
|
98
123
|
Paragraph *code; /* intermediate code generated by compile() */
|
99
124
|
int compiled; /* set after mkd_compile() */
|
100
125
|
int html; /* set after (internal) htmlify() */
|
101
126
|
int tabstop; /* for properly expanding tabs (ick) */
|
102
127
|
MMIOT *ctx; /* backend buffers, flags, and structures */
|
103
|
-
|
128
|
+
Callback_data cb; /* callback functions & private data */
|
104
129
|
} Document;
|
105
130
|
|
106
131
|
|
107
132
|
extern int mkd_firstnonblank(Line *);
|
108
|
-
extern int mkd_compile(Document *,
|
133
|
+
extern int mkd_compile(Document *, DWORD);
|
109
134
|
extern int mkd_document(Document *, char **);
|
110
135
|
extern int mkd_generatehtml(Document *, FILE *);
|
111
136
|
extern int mkd_css(Document *, char **);
|
@@ -114,19 +139,17 @@ extern int mkd_generatecss(Document *, FILE *);
|
|
114
139
|
extern int mkd_xml(char *, int , char **);
|
115
140
|
extern int mkd_generatexml(char *, int, FILE *);
|
116
141
|
extern void mkd_cleanup(Document *);
|
117
|
-
extern int mkd_line(char *, int, char **,
|
118
|
-
extern int mkd_generateline(char *, int, FILE*,
|
142
|
+
extern int mkd_line(char *, int, char **, DWORD);
|
143
|
+
extern int mkd_generateline(char *, int, FILE*, DWORD);
|
119
144
|
#define mkd_text mkd_generateline
|
120
145
|
extern void mkd_basename(Document*, char *);
|
121
|
-
extern void mkd_string_to_anchor(char*,int, void(*)(int,void*), void
|
122
|
-
|
123
|
-
extern Document *mkd_in(FILE *, int);
|
124
|
-
extern Document *mkd_string(char*,int, int);
|
146
|
+
extern void mkd_string_to_anchor(char*,int, void(*)(int,void*), void*, int);
|
125
147
|
|
126
|
-
|
127
|
-
|
128
|
-
#define INPUT_MASK (NO_HEADER|STD_TABSTOP)
|
148
|
+
extern Document *mkd_in(FILE *, DWORD);
|
149
|
+
extern Document *mkd_string(char*,int, DWORD);
|
129
150
|
|
151
|
+
extern void mkd_initialize();
|
152
|
+
extern void mkd_shlib_destructor();
|
130
153
|
|
131
154
|
/* internal resource handling functions.
|
132
155
|
*/
|
data/ext/mkdio.c
CHANGED
@@ -24,8 +24,10 @@ new_Document()
|
|
24
24
|
Document *ret = calloc(sizeof(Document), 1);
|
25
25
|
|
26
26
|
if ( ret ) {
|
27
|
-
if (( ret->ctx = calloc(sizeof(MMIOT), 1) ))
|
27
|
+
if (( ret->ctx = calloc(sizeof(MMIOT), 1) )) {
|
28
|
+
ret->magic = VALID_DOCUMENT;
|
28
29
|
return ret;
|
30
|
+
}
|
29
31
|
free(ret);
|
30
32
|
}
|
31
33
|
return 0;
|
@@ -68,16 +70,14 @@ queue(Document* a, Cstring *line)
|
|
68
70
|
}
|
69
71
|
|
70
72
|
|
71
|
-
#ifdef PANDOC_HEADER
|
72
73
|
/* trim leading blanks from a header line
|
73
74
|
*/
|
74
75
|
static void
|
75
|
-
|
76
|
+
header_dle(Line *p)
|
76
77
|
{
|
77
78
|
CLIP(p->text, 0, 1);
|
78
79
|
p->dle = mkd_firstnonblank(p);
|
79
80
|
}
|
80
|
-
#endif
|
81
81
|
|
82
82
|
|
83
83
|
/* build a Document from any old input.
|
@@ -90,26 +90,22 @@ populate(getc_func getc, void* ctx, int flags)
|
|
90
90
|
Cstring line;
|
91
91
|
Document *a = new_Document();
|
92
92
|
int c;
|
93
|
-
#ifdef PANDOC_HEADER
|
94
93
|
int pandoc = 0;
|
95
|
-
#endif
|
96
94
|
|
97
95
|
if ( !a ) return 0;
|
98
96
|
|
99
|
-
a->tabstop = (flags &
|
97
|
+
a->tabstop = (flags & MKD_TABSTOP) ? 4 : TABSTOP;
|
100
98
|
|
101
99
|
CREATE(line);
|
102
100
|
|
103
101
|
while ( (c = (*getc)(ctx)) != EOF ) {
|
104
102
|
if ( c == '\n' ) {
|
105
|
-
#ifdef PANDOC_HEADER
|
106
103
|
if ( pandoc != EOF && pandoc < 3 ) {
|
107
104
|
if ( S(line) && (T(line)[0] == '%') )
|
108
105
|
pandoc++;
|
109
106
|
else
|
110
107
|
pandoc = EOF;
|
111
108
|
}
|
112
|
-
#endif
|
113
109
|
queue(a, &line);
|
114
110
|
S(line) = 0;
|
115
111
|
}
|
@@ -122,20 +118,19 @@ populate(getc_func getc, void* ctx, int flags)
|
|
122
118
|
|
123
119
|
DELETE(line);
|
124
120
|
|
125
|
-
|
126
|
-
if ( (pandoc == 3) && !(flags & NO_HEADER) ) {
|
121
|
+
if ( (pandoc == 3) && !(flags & (MKD_NOHEADER|MKD_STRICT)) ) {
|
127
122
|
/* the first three lines started with %, so we have a header.
|
128
123
|
* clip the first three lines out of content and hang them
|
129
124
|
* off header.
|
130
125
|
*/
|
131
|
-
|
132
|
-
|
133
|
-
a->
|
134
|
-
|
135
|
-
|
136
|
-
|
126
|
+
Line *headers = T(a->content);
|
127
|
+
|
128
|
+
a->title = headers; header_dle(a->title);
|
129
|
+
a->author= headers->next; header_dle(a->author);
|
130
|
+
a->date = headers->next->next; header_dle(a->date);
|
131
|
+
|
132
|
+
T(a->content) = headers->next->next->next;
|
137
133
|
}
|
138
|
-
#endif
|
139
134
|
|
140
135
|
return a;
|
141
136
|
}
|
@@ -144,7 +139,7 @@ populate(getc_func getc, void* ctx, int flags)
|
|
144
139
|
/* convert a file into a linked list
|
145
140
|
*/
|
146
141
|
Document *
|
147
|
-
mkd_in(FILE *f,
|
142
|
+
mkd_in(FILE *f, DWORD flags)
|
148
143
|
{
|
149
144
|
return populate((getc_func)fgetc, f, flags & INPUT_MASK);
|
150
145
|
}
|
@@ -172,7 +167,7 @@ strget(struct string_ctx *in)
|
|
172
167
|
/* convert a block of text into a linked list
|
173
168
|
*/
|
174
169
|
Document *
|
175
|
-
mkd_string(char *buf, int len,
|
170
|
+
mkd_string(char *buf, int len, DWORD flags)
|
176
171
|
{
|
177
172
|
struct string_ctx about;
|
178
173
|
|
@@ -192,7 +187,7 @@ mkd_generatehtml(Document *p, FILE *output)
|
|
192
187
|
int szdoc;
|
193
188
|
|
194
189
|
if ( (szdoc = mkd_document(p, &doc)) != EOF ) {
|
195
|
-
if ( p->ctx->flags &
|
190
|
+
if ( p->ctx->flags & MKD_CDATA )
|
196
191
|
mkd_generatexml(doc, szdoc, output);
|
197
192
|
else
|
198
193
|
fwrite(doc, szdoc, 1, output);
|
@@ -217,30 +212,35 @@ markdown(Document *document, FILE *out, int flags)
|
|
217
212
|
}
|
218
213
|
|
219
214
|
|
220
|
-
void
|
221
|
-
mkd_basename(Document *document, char *base)
|
222
|
-
{
|
223
|
-
if ( document )
|
224
|
-
document->base = base;
|
225
|
-
}
|
226
|
-
|
227
|
-
|
228
215
|
/* write out a Cstring, mangled into a form suitable for `<a href=` or `<a id=`
|
229
216
|
*/
|
230
217
|
void
|
231
|
-
mkd_string_to_anchor(char *s, int len, void(*outchar)(int,void*),
|
218
|
+
mkd_string_to_anchor(char *s, int len, void(*outchar)(int,void*),
|
219
|
+
void *out, int labelformat)
|
232
220
|
{
|
233
221
|
unsigned char c;
|
222
|
+
|
223
|
+
int i, size;
|
224
|
+
char *line;
|
225
|
+
|
226
|
+
size = mkd_line(s, len, &line, IS_LABEL);
|
234
227
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
(
|
228
|
+
if ( labelformat && size && !isalpha(line[0]) )
|
229
|
+
(*outchar)('L',out);
|
230
|
+
for ( i=0; i < size ; i++ ) {
|
231
|
+
c = line[i];
|
232
|
+
if ( labelformat ) {
|
233
|
+
if ( isalnum(c) || (c == '_') || (c == ':') || (c == '-') || (c == '.' ) )
|
234
|
+
(*outchar)(c, out);
|
235
|
+
else
|
236
|
+
(*outchar)('.',out);
|
237
|
+
}
|
241
238
|
else
|
242
|
-
(*outchar)(
|
239
|
+
(*outchar)(c,out);
|
243
240
|
}
|
241
|
+
|
242
|
+
if (line)
|
243
|
+
free(line);
|
244
244
|
}
|
245
245
|
|
246
246
|
|
@@ -259,7 +259,7 @@ mkd_parse_line(char *bfr, int size, MMIOT *f, int flags)
|
|
259
259
|
/* ___mkd_reparse() a line, returning it in malloc()ed memory
|
260
260
|
*/
|
261
261
|
int
|
262
|
-
mkd_line(char *bfr, int size, char **res,
|
262
|
+
mkd_line(char *bfr, int size, char **res, DWORD flags)
|
263
263
|
{
|
264
264
|
MMIOT f;
|
265
265
|
int len;
|
@@ -272,9 +272,10 @@ mkd_line(char *bfr, int size, char **res, int flags)
|
|
272
272
|
* should be an opaque method that transparently moves
|
273
273
|
* the pointer out of the embedded Cstring.
|
274
274
|
*/
|
275
|
+
EXPAND(f.out) = 0;
|
275
276
|
*res = T(f.out);
|
276
277
|
T(f.out) = 0;
|
277
|
-
S(f.out) = 0;
|
278
|
+
S(f.out) = ALLOCATED(f.out) = 0;
|
278
279
|
}
|
279
280
|
else {
|
280
281
|
*res = 0;
|
@@ -288,12 +289,12 @@ mkd_line(char *bfr, int size, char **res, int flags)
|
|
288
289
|
/* ___mkd_reparse() a line, writing it to a FILE
|
289
290
|
*/
|
290
291
|
int
|
291
|
-
mkd_generateline(char *bfr, int size, FILE *output,
|
292
|
+
mkd_generateline(char *bfr, int size, FILE *output, DWORD flags)
|
292
293
|
{
|
293
294
|
MMIOT f;
|
294
295
|
|
295
296
|
mkd_parse_line(bfr, size, &f, flags);
|
296
|
-
if ( flags &
|
297
|
+
if ( flags & MKD_CDATA )
|
297
298
|
mkd_generatexml(T(f.out), S(f.out), output);
|
298
299
|
else
|
299
300
|
fwrite(T(f.out), S(f.out), 1, output);
|
@@ -301,3 +302,43 @@ mkd_generateline(char *bfr, int size, FILE *output, int flags)
|
|
301
302
|
___mkd_freemmiot(&f, 0);
|
302
303
|
return 0;
|
303
304
|
}
|
305
|
+
|
306
|
+
|
307
|
+
/* set the url display callback
|
308
|
+
*/
|
309
|
+
void
|
310
|
+
mkd_e_url(Document *f, mkd_callback_t edit)
|
311
|
+
{
|
312
|
+
if ( f )
|
313
|
+
f->cb.e_url = edit;
|
314
|
+
}
|
315
|
+
|
316
|
+
|
317
|
+
/* set the url options callback
|
318
|
+
*/
|
319
|
+
void
|
320
|
+
mkd_e_flags(Document *f, mkd_callback_t edit)
|
321
|
+
{
|
322
|
+
if ( f )
|
323
|
+
f->cb.e_flags = edit;
|
324
|
+
}
|
325
|
+
|
326
|
+
|
327
|
+
/* set the url display/options deallocator
|
328
|
+
*/
|
329
|
+
void
|
330
|
+
mkd_e_free(Document *f, mkd_free_t dealloc)
|
331
|
+
{
|
332
|
+
if ( f )
|
333
|
+
f->cb.e_free = dealloc;
|
334
|
+
}
|
335
|
+
|
336
|
+
|
337
|
+
/* set the url display/options context data field
|
338
|
+
*/
|
339
|
+
void
|
340
|
+
mkd_e_data(Document *f, void *data)
|
341
|
+
{
|
342
|
+
if ( f )
|
343
|
+
f->cb.e_data = data;
|
344
|
+
}
|
data/ext/mkdio.h
CHANGED
@@ -5,24 +5,29 @@
|
|
5
5
|
|
6
6
|
typedef void MMIOT;
|
7
7
|
|
8
|
+
typedef unsigned int mkd_flag_t;
|
9
|
+
|
8
10
|
/* line builder for markdown()
|
9
11
|
*/
|
10
|
-
MMIOT *mkd_in(FILE*,
|
11
|
-
MMIOT *mkd_string(char*,int,
|
12
|
+
MMIOT *mkd_in(FILE*,mkd_flag_t); /* assemble input from a file */
|
13
|
+
MMIOT *mkd_string(char*,int,mkd_flag_t); /* assemble input from a buffer */
|
12
14
|
|
13
15
|
void mkd_basename(MMIOT*,char*);
|
14
16
|
|
17
|
+
void mkd_initialize();
|
18
|
+
void mkd_shlib_destructor();
|
19
|
+
|
15
20
|
/* compilation, debugging, cleanup
|
16
21
|
*/
|
17
|
-
int mkd_compile(MMIOT*,
|
22
|
+
int mkd_compile(MMIOT*, mkd_flag_t);
|
18
23
|
int mkd_cleanup(MMIOT*);
|
19
24
|
|
20
25
|
/* markup functions
|
21
26
|
*/
|
22
27
|
int mkd_dump(MMIOT*, FILE*, int, char*);
|
23
|
-
int markdown(MMIOT*, FILE*,
|
24
|
-
int mkd_line(char *, int, char **,
|
25
|
-
void mkd_string_to_anchor(char *, int, int (*)(int,void*), void
|
28
|
+
int markdown(MMIOT*, FILE*, mkd_flag_t);
|
29
|
+
int mkd_line(char *, int, char **, mkd_flag_t);
|
30
|
+
void mkd_string_to_anchor(char *, int, int (*)(int,void*), void*, int);
|
26
31
|
int mkd_xhtmlpage(MMIOT*,int,FILE*);
|
27
32
|
|
28
33
|
/* header block access
|
@@ -45,35 +50,51 @@ int mkd_generatetoc(MMIOT*,FILE*);
|
|
45
50
|
int mkd_generatexml(char *, int,FILE*);
|
46
51
|
int mkd_generatecss(MMIOT*,FILE*);
|
47
52
|
#define mkd_style mkd_generatecss
|
48
|
-
int mkd_generateline(char *, int, FILE*,
|
53
|
+
int mkd_generateline(char *, int, FILE*, mkd_flag_t);
|
49
54
|
#define mkd_text mkd_generateline
|
50
55
|
|
56
|
+
/* url generator callbacks
|
57
|
+
*/
|
58
|
+
typedef char * (*mkd_callback_t)(const char*, const int, void*);
|
59
|
+
typedef void (*mkd_free_t)(char*, void*);
|
60
|
+
|
61
|
+
void mkd_e_url(void *, mkd_callback_t);
|
62
|
+
void mkd_e_flags(void *, mkd_callback_t);
|
63
|
+
void mkd_e_free(void *, mkd_free_t );
|
64
|
+
void mkd_e_data(void *, void *);
|
65
|
+
|
51
66
|
/* version#.
|
52
67
|
*/
|
53
68
|
extern char markdown_version[];
|
54
69
|
|
55
70
|
/* special flags for markdown() and mkd_text()
|
56
71
|
*/
|
57
|
-
#define MKD_NOLINKS
|
58
|
-
#define MKD_NOIMAGE
|
59
|
-
#define MKD_NOPANTS
|
60
|
-
#define MKD_NOHTML
|
61
|
-
#define MKD_STRICT
|
62
|
-
#define MKD_TAGTEXT
|
63
|
-
|
64
|
-
#define MKD_NO_EXT
|
65
|
-
#define MKD_CDATA
|
66
|
-
#define
|
67
|
-
#define
|
68
|
-
#define
|
69
|
-
#define
|
70
|
-
#define
|
72
|
+
#define MKD_NOLINKS 0x00000001 /* don't do link processing, block <a> tags */
|
73
|
+
#define MKD_NOIMAGE 0x00000002 /* don't do image processing, block <img> */
|
74
|
+
#define MKD_NOPANTS 0x00000004 /* don't run smartypants() */
|
75
|
+
#define MKD_NOHTML 0x00000008 /* don't allow raw html through AT ALL */
|
76
|
+
#define MKD_STRICT 0x00000010 /* disable SUPERSCRIPT, RELAXED_EMPHASIS */
|
77
|
+
#define MKD_TAGTEXT 0x00000020 /* process text inside an html tag; no
|
78
|
+
* <em>, no <bold>, no html or [] expansion */
|
79
|
+
#define MKD_NO_EXT 0x00000040 /* don't allow pseudo-protocols */
|
80
|
+
#define MKD_CDATA 0x00000080 /* generate code for xml ![CDATA[...]] */
|
81
|
+
#define MKD_NOSUPERSCRIPT 0x00000100 /* no A^B */
|
82
|
+
#define MKD_NORELAXED 0x00000200 /* emphasis happens /everywhere/ */
|
83
|
+
#define MKD_NOTABLES 0x00000400 /* disallow tables */
|
84
|
+
#define MKD_NOSTRIKETHROUGH 0x00000800 /* forbid ~~strikethrough~~ */
|
85
|
+
#define MKD_TOC 0x00001000 /* do table-of-contents processing */
|
86
|
+
#define MKD_1_COMPAT 0x00002000 /* compatibility with MarkdownTest_1.0 */
|
87
|
+
#define MKD_AUTOLINK 0x00004000 /* make http://foo.com link even without <>s */
|
88
|
+
#define MKD_SAFELINK 0x00008000 /* paranoid check for link protocol */
|
89
|
+
#define MKD_NOHEADER 0x00010000 /* don't process header blocks */
|
90
|
+
#define MKD_TABSTOP 0x00020000 /* expand tabs to 4 spaces */
|
91
|
+
#define MKD_NODIVQUOTE 0x00040000 /* forbid >%class% blocks */
|
92
|
+
#define MKD_NOALPHALIST 0x00080000 /* forbid alphabetic lists */
|
93
|
+
#define MKD_NODLIST 0x00100000 /* forbid definition lists */
|
71
94
|
#define MKD_EMBED MKD_NOLINKS|MKD_NOIMAGE|MKD_TAGTEXT
|
72
95
|
|
73
96
|
/* special flags for mkd_in() and mkd_string()
|
74
97
|
*/
|
75
|
-
#define MKD_NOHEADER 0x0100 /* don't process header blocks */
|
76
|
-
#define MKD_TABSTOP 0x0200 /* expand tabs to 4 spaces */
|
77
98
|
|
78
99
|
|
79
100
|
#endif/*_MKDIO_D*/
|