rdiscount 1.6.3.2 → 1.6.5
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/Rakefile +3 -3
- data/ext/cstring.h +3 -1
- data/ext/dumptree.c +1 -0
- data/ext/generate.c +2 -1
- data/ext/html5.c +24 -0
- data/ext/markdown.c +92 -94
- data/ext/markdown.h +2 -0
- data/ext/mkdio.c +3 -1
- data/ext/resource.c +1 -1
- data/ext/tags.c +109 -0
- data/ext/tags.h +18 -0
- data/lib/rdiscount.rb +1 -1
- data/man/rdiscount.1 +6 -7
- data/rdiscount.gemspec +6 -3
- metadata +7 -5
data/Rakefile
CHANGED
@@ -23,7 +23,7 @@ end
|
|
23
23
|
CLEAN.include 'ext/Makefile', 'ext/mkmf.log'
|
24
24
|
|
25
25
|
file "ext/rdiscount.#{DLEXT}" => FileList["ext/Makefile"] do |f|
|
26
|
-
sh 'cd ext && make clean && make'
|
26
|
+
sh 'cd ext && make clean && make && rm -rf conftest.dSYM'
|
27
27
|
end
|
28
28
|
CLEAN.include 'ext/*.{o,bundle,so,dll}'
|
29
29
|
|
@@ -112,8 +112,8 @@ desc 'Gather required discount sources into extension directory'
|
|
112
112
|
task :gather => 'discount' do |t|
|
113
113
|
files =
|
114
114
|
FileList[
|
115
|
-
'discount/{markdown,mkdio,amalloc,cstring}.h',
|
116
|
-
'discount/{markdown,docheader,dumptree,generate,mkdio,resource,toc,Csio,xml,css,basename,emmatch}.c'
|
115
|
+
'discount/{markdown,mkdio,amalloc,cstring,tags}.h',
|
116
|
+
'discount/{markdown,docheader,dumptree,generate,mkdio,resource,toc,Csio,xml,css,basename,emmatch,tags,html5}.c'
|
117
117
|
]
|
118
118
|
cp files, 'ext/',
|
119
119
|
:preserve => true,
|
data/ext/cstring.h
CHANGED
data/ext/dumptree.c
CHANGED
data/ext/generate.c
CHANGED
@@ -468,9 +468,10 @@ static linkytype linkt = { 0, 0, "<a href=\"", "\"",
|
|
468
468
|
*/
|
469
469
|
static linkytype specials[] = {
|
470
470
|
{ "id:", 3, "<a id=\"", "\"", 0, ">", "</a>", 0, IS_URL },
|
471
|
-
{ "class:", 6, "<span class=\"", "\"", 0, ">", "</span>", 0, 0 },
|
472
471
|
{ "raw:", 4, 0, 0, 0, 0, 0, DENY_HTML, 0 },
|
472
|
+
{ "lang:", 5, "<span lang=\"", "\"", 0, ">", "</span>", 0, 0 },
|
473
473
|
{ "abbr:", 5, "<abbr title=\"", "\"", 0, ">", "</abbr>", 0, 0 },
|
474
|
+
{ "class:", 6, "<span class=\"", "\"", 0, ">", "</span>", 0, 0 },
|
474
475
|
} ;
|
475
476
|
|
476
477
|
#define NR(x) (sizeof x / sizeof x[0])
|
data/ext/html5.c
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
/* block-level tags for passing html5 blocks through the blender
|
2
|
+
*/
|
3
|
+
#include "tags.h"
|
4
|
+
|
5
|
+
void
|
6
|
+
mkd_with_html5_tags()
|
7
|
+
{
|
8
|
+
static int populated = 0;
|
9
|
+
|
10
|
+
if ( populated ) return;
|
11
|
+
populated = 1;
|
12
|
+
|
13
|
+
mkd_prepare_tags();
|
14
|
+
|
15
|
+
mkd_define_tag("ASIDE", 0);
|
16
|
+
mkd_define_tag("FOOTER", 0);
|
17
|
+
mkd_define_tag("HEADER", 0);
|
18
|
+
mkd_define_tag("HGROUP", 0);
|
19
|
+
mkd_define_tag("NAV", 0);
|
20
|
+
mkd_define_tag("SECTION", 0);
|
21
|
+
mkd_define_tag("ARTICLE", 0);
|
22
|
+
|
23
|
+
mkd_sort_tags();
|
24
|
+
}
|
data/ext/markdown.c
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
* The redistribution terms are provided in the COPYRIGHT file that must
|
5
5
|
* be distributed with this source code.
|
6
6
|
*/
|
7
|
+
#include "config.h"
|
8
|
+
|
7
9
|
#include <stdio.h>
|
8
10
|
#include <string.h>
|
9
11
|
#include <stdarg.h>
|
@@ -11,53 +13,15 @@
|
|
11
13
|
#include <time.h>
|
12
14
|
#include <ctype.h>
|
13
15
|
|
14
|
-
#include "config.h"
|
15
|
-
|
16
16
|
#include "cstring.h"
|
17
17
|
#include "markdown.h"
|
18
18
|
#include "amalloc.h"
|
19
|
-
|
20
|
-
/* block-level tags for passing html blocks through the blender
|
21
|
-
*/
|
22
|
-
struct kw {
|
23
|
-
char *id;
|
24
|
-
int size;
|
25
|
-
int selfclose;
|
26
|
-
} ;
|
27
|
-
|
28
|
-
#define KW(x) { x, sizeof(x)-1, 0 }
|
29
|
-
#define SC(x) { x, sizeof(x)-1, 1 }
|
30
|
-
|
31
|
-
static struct kw blocktags[] = { KW("!--"), KW("STYLE"), KW("SCRIPT"),
|
32
|
-
KW("ADDRESS"), KW("BDO"), KW("BLOCKQUOTE"),
|
33
|
-
KW("CENTER"), KW("DFN"), KW("DIV"), KW("H1"),
|
34
|
-
KW("H2"), KW("H3"), KW("H4"), KW("H5"),
|
35
|
-
KW("H6"), KW("LISTING"), KW("NOBR"),
|
36
|
-
KW("UL"), KW("P"), KW("OL"), KW("DL"),
|
37
|
-
KW("PLAINTEXT"), KW("PRE"), KW("TABLE"),
|
38
|
-
KW("WBR"), KW("XMP"), SC("HR"), SC("BR"),
|
39
|
-
KW("IFRAME"), KW("MAP"), KW("ARTICLE"),
|
40
|
-
KW("ASIDE"), KW("FOOTER"), KW("HEADER"),
|
41
|
-
KW("HGROUP"), KW("NAV"), KW("SECTION") };
|
42
|
-
#define SZTAGS (sizeof blocktags / sizeof blocktags[0])
|
43
|
-
#define MAXTAG 11 /* sizeof "BLOCKQUOTE" */
|
19
|
+
#include "tags.h"
|
44
20
|
|
45
21
|
typedef int (*stfu)(const void*,const void*);
|
46
22
|
|
47
23
|
typedef ANCHOR(Paragraph) ParagraphRoot;
|
48
24
|
|
49
|
-
|
50
|
-
/* case insensitive string sort (for qsort() and bsearch() of block tags)
|
51
|
-
*/
|
52
|
-
static int
|
53
|
-
casort(struct kw *a, struct kw *b)
|
54
|
-
{
|
55
|
-
if ( a->size != b->size )
|
56
|
-
return a->size - b->size;
|
57
|
-
return strncasecmp(a->id, b->id, b->size);
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
25
|
/* case insensitive string sort for Footnote tags.
|
62
26
|
*/
|
63
27
|
int
|
@@ -137,19 +101,28 @@ ___mkd_tidy(Cstring *t)
|
|
137
101
|
}
|
138
102
|
|
139
103
|
|
104
|
+
static struct kw comment = { "!--", 3, 0 };
|
105
|
+
|
140
106
|
static struct kw *
|
141
107
|
isopentag(Line *p)
|
142
108
|
{
|
143
109
|
int i=0, len;
|
144
|
-
|
110
|
+
char *line;
|
145
111
|
|
146
112
|
if ( !p ) return 0;
|
147
113
|
|
114
|
+
line = T(p->text);
|
148
115
|
len = S(p->text);
|
149
116
|
|
150
|
-
if ( len < 3 ||
|
117
|
+
if ( len < 3 || line[0] != '<' )
|
151
118
|
return 0;
|
152
119
|
|
120
|
+
if ( line[1] == '!' && line[2] == '-' && line[3] == '-' )
|
121
|
+
/* comments need special case handling, because
|
122
|
+
* the !-- doesn't need to end in a whitespace
|
123
|
+
*/
|
124
|
+
return &comment;
|
125
|
+
|
153
126
|
/* find how long the tag is so we can check to see if
|
154
127
|
* it's a block-level tag
|
155
128
|
*/
|
@@ -158,13 +131,8 @@ isopentag(Line *p)
|
|
158
131
|
&& !isspace(T(p->text)[i]); ++i )
|
159
132
|
;
|
160
133
|
|
161
|
-
key.id = T(p->text)+1;
|
162
|
-
key.size = i-1;
|
163
|
-
|
164
|
-
if ( ret = bsearch(&key, blocktags, SZTAGS, sizeof key, (stfu)casort))
|
165
|
-
return ret;
|
166
134
|
|
167
|
-
return
|
135
|
+
return mkd_search_tags(T(p->text)+1, i-1);
|
168
136
|
}
|
169
137
|
|
170
138
|
|
@@ -173,6 +141,8 @@ typedef struct _flo {
|
|
173
141
|
int i;
|
174
142
|
} FLO;
|
175
143
|
|
144
|
+
#define floindex(x) (x.i)
|
145
|
+
|
176
146
|
|
177
147
|
static int
|
178
148
|
flogetc(FLO *f)
|
@@ -188,6 +158,41 @@ flogetc(FLO *f)
|
|
188
158
|
}
|
189
159
|
|
190
160
|
|
161
|
+
static void
|
162
|
+
splitline(Line *t, int cutpoint)
|
163
|
+
{
|
164
|
+
if ( t && (cutpoint < S(t->text)) ) {
|
165
|
+
Line *tmp = calloc(1, sizeof *tmp);
|
166
|
+
|
167
|
+
tmp->next = t->next;
|
168
|
+
t->next = tmp;
|
169
|
+
|
170
|
+
tmp->dle = t->dle;
|
171
|
+
SUFFIX(tmp->text, T(t->text)+cutpoint, S(t->text)-cutpoint);
|
172
|
+
S(t->text) = cutpoint;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
static Line *
|
178
|
+
commentblock(Paragraph *p)
|
179
|
+
{
|
180
|
+
Line *t, *ret;
|
181
|
+
char *end;
|
182
|
+
|
183
|
+
for ( t = p->text; t ; t = t->next) {
|
184
|
+
if ( end = strstr(T(t->text), "-->") ) {
|
185
|
+
splitline(t, 3 + (end - T(t->text)) );
|
186
|
+
ret = t->next;
|
187
|
+
t->next = 0;
|
188
|
+
return ret;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
return t;
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
|
191
196
|
static Line *
|
192
197
|
htmlblock(Paragraph *p, struct kw *tag)
|
193
198
|
{
|
@@ -196,7 +201,10 @@ htmlblock(Paragraph *p, struct kw *tag)
|
|
196
201
|
int c;
|
197
202
|
int i, closing, depth=0;
|
198
203
|
|
199
|
-
if ( tag
|
204
|
+
if ( tag == &comment )
|
205
|
+
return commentblock(p);
|
206
|
+
|
207
|
+
if ( tag->selfclose ) {
|
200
208
|
ret = f.t->next;
|
201
209
|
f.t->next = 0;
|
202
210
|
return ret;
|
@@ -234,6 +242,7 @@ htmlblock(Paragraph *p, struct kw *tag)
|
|
234
242
|
}
|
235
243
|
if ( !f.t )
|
236
244
|
return 0;
|
245
|
+
splitline(f.t, floindex(f));
|
237
246
|
ret = f.t->next;
|
238
247
|
f.t->next = 0;
|
239
248
|
return ret;
|
@@ -246,23 +255,6 @@ htmlblock(Paragraph *p, struct kw *tag)
|
|
246
255
|
}
|
247
256
|
|
248
257
|
|
249
|
-
static Line *
|
250
|
-
comment(Paragraph *p)
|
251
|
-
{
|
252
|
-
Line *t, *ret;
|
253
|
-
|
254
|
-
for ( t = p->text; t ; t = t->next) {
|
255
|
-
if ( strstr(T(t->text), "-->") ) {
|
256
|
-
ret = t->next;
|
257
|
-
t->next = 0;
|
258
|
-
return ret;
|
259
|
-
}
|
260
|
-
}
|
261
|
-
return t;
|
262
|
-
|
263
|
-
}
|
264
|
-
|
265
|
-
|
266
258
|
/* tables look like
|
267
259
|
* header|header{|header}
|
268
260
|
* ------|------{|......}
|
@@ -365,26 +357,9 @@ ishr(Line *t)
|
|
365
357
|
|
366
358
|
|
367
359
|
static int
|
368
|
-
|
360
|
+
issetext(Line *t, int *htyp)
|
369
361
|
{
|
370
362
|
int i;
|
371
|
-
|
372
|
-
|
373
|
-
/* first check for etx-style ###HEADER###
|
374
|
-
*/
|
375
|
-
|
376
|
-
/* leading run of `#`'s ?
|
377
|
-
*/
|
378
|
-
for ( i=0; T(t->text)[i] == '#'; ++i)
|
379
|
-
;
|
380
|
-
|
381
|
-
/* ANY leading `#`'s make this into an ETX header
|
382
|
-
*/
|
383
|
-
if ( i && (i < S(t->text) || i > 1) ) {
|
384
|
-
*htyp = ETX;
|
385
|
-
return 1;
|
386
|
-
}
|
387
|
-
|
388
363
|
/* then check for setext-style HEADER
|
389
364
|
* ======
|
390
365
|
*/
|
@@ -409,6 +384,31 @@ ishdr(Line *t, int *htyp)
|
|
409
384
|
}
|
410
385
|
|
411
386
|
|
387
|
+
static int
|
388
|
+
ishdr(Line *t, int *htyp)
|
389
|
+
{
|
390
|
+
int i;
|
391
|
+
|
392
|
+
|
393
|
+
/* first check for etx-style ###HEADER###
|
394
|
+
*/
|
395
|
+
|
396
|
+
/* leading run of `#`'s ?
|
397
|
+
*/
|
398
|
+
for ( i=0; T(t->text)[i] == '#'; ++i)
|
399
|
+
;
|
400
|
+
|
401
|
+
/* ANY leading `#`'s make this into an ETX header
|
402
|
+
*/
|
403
|
+
if ( i && (i < S(t->text) || i > 1) ) {
|
404
|
+
*htyp = ETX;
|
405
|
+
return 1;
|
406
|
+
}
|
407
|
+
|
408
|
+
return issetext(t, htyp);
|
409
|
+
}
|
410
|
+
|
411
|
+
|
412
412
|
static int
|
413
413
|
isdefinition(Line *t)
|
414
414
|
{
|
@@ -743,11 +743,12 @@ listitem(Paragraph *p, int indent)
|
|
743
743
|
t->next = 0;
|
744
744
|
return q;
|
745
745
|
}
|
746
|
-
/* indent
|
747
|
-
|
746
|
+
/* indent at least 2, and at most as
|
747
|
+
* as far as the initial line was indented. */
|
748
|
+
indent = clip ? clip : 2;
|
748
749
|
}
|
749
750
|
|
750
|
-
if ( (q->dle < indent) && (ishr(q) || islist(q,&z)) && !
|
751
|
+
if ( (q->dle < indent) && (ishr(q) || islist(q,&z)) && !issetext(q,&z) ) {
|
751
752
|
q = t->next;
|
752
753
|
t->next = 0;
|
753
754
|
return q;
|
@@ -948,10 +949,7 @@ compile_document(Line *ptr, MMIOT *f)
|
|
948
949
|
T(source) = E(source) = 0;
|
949
950
|
}
|
950
951
|
p = Pp(&d, ptr, strcmp(tag->id, "STYLE") == 0 ? STYLE : HTML);
|
951
|
-
|
952
|
-
ptr = comment(p);
|
953
|
-
else
|
954
|
-
ptr = htmlblock(p, tag);
|
952
|
+
ptr = htmlblock(p, tag);
|
955
953
|
}
|
956
954
|
else if ( isfootnote(ptr) ) {
|
957
955
|
/* footnotes, like cats, sleep anywhere; pull them
|
@@ -1054,15 +1052,15 @@ compile(Line *ptr, int toplevel, MMIOT *f)
|
|
1054
1052
|
}
|
1055
1053
|
|
1056
1054
|
|
1057
|
-
|
1058
|
-
|
1055
|
+
void
|
1056
|
+
mkd_initialize()
|
1059
1057
|
{
|
1060
1058
|
static int first = 1;
|
1061
1059
|
|
1062
1060
|
if ( first-- > 0 ) {
|
1063
1061
|
first = 0;
|
1064
1062
|
INITRNG(time(0));
|
1065
|
-
|
1063
|
+
mkd_prepare_tags();
|
1066
1064
|
}
|
1067
1065
|
}
|
1068
1066
|
|
@@ -1092,7 +1090,7 @@ mkd_compile(Document *doc, int flags)
|
|
1092
1090
|
doc->ctx->footnotes = malloc(sizeof doc->ctx->footnotes[0]);
|
1093
1091
|
CREATE(*doc->ctx->footnotes);
|
1094
1092
|
|
1095
|
-
|
1093
|
+
mkd_initialize();
|
1096
1094
|
|
1097
1095
|
doc->code = compile_document(T(doc->content), doc->ctx);
|
1098
1096
|
qsort(T(*doc->ctx->footnotes), S(*doc->ctx->footnotes),
|
data/ext/markdown.h
CHANGED
@@ -104,6 +104,8 @@ typedef struct mmiot {
|
|
104
104
|
* root of the linked list of Lines.
|
105
105
|
*/
|
106
106
|
typedef struct document {
|
107
|
+
int magic; /* "I AM VALID" magic number */
|
108
|
+
#define VALID_DOCUMENT 0x19600731
|
107
109
|
Line *headers; /* title -> author(s) -> date */
|
108
110
|
ANCHOR(Line) content; /* uncompiled text, not valid after compile() */
|
109
111
|
Paragraph *code; /* intermediate code generated by compile() */
|
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;
|
data/ext/resource.c
CHANGED
data/ext/tags.c
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
/* block-level tags for passing html blocks through the blender
|
2
|
+
*/
|
3
|
+
#define __WITHOUT_AMALLOC 1
|
4
|
+
#include "cstring.h"
|
5
|
+
#include "tags.h"
|
6
|
+
|
7
|
+
STRING(struct kw) blocktags;
|
8
|
+
|
9
|
+
|
10
|
+
/* define a html block tag
|
11
|
+
*/
|
12
|
+
void
|
13
|
+
mkd_define_tag(char *id, int selfclose)
|
14
|
+
{
|
15
|
+
struct kw *p = &EXPAND(blocktags);
|
16
|
+
|
17
|
+
p->id = id;
|
18
|
+
p->size = strlen(id);
|
19
|
+
p->selfclose = selfclose;
|
20
|
+
}
|
21
|
+
|
22
|
+
|
23
|
+
/* case insensitive string sort (for qsort() and bsearch() of block tags)
|
24
|
+
*/
|
25
|
+
static int
|
26
|
+
casort(struct kw *a, struct kw *b)
|
27
|
+
{
|
28
|
+
if ( a->size != b->size )
|
29
|
+
return a->size - b->size;
|
30
|
+
return strncasecmp(a->id, b->id, b->size);
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
/* stupid cast to make gcc shut up about the function types being
|
35
|
+
* passed into qsort() and bsearch()
|
36
|
+
*/
|
37
|
+
typedef int (*stfu)(const void*,const void*);
|
38
|
+
|
39
|
+
|
40
|
+
/* sort the list of html block tags for later searching
|
41
|
+
*/
|
42
|
+
void
|
43
|
+
mkd_sort_tags()
|
44
|
+
{
|
45
|
+
qsort(T(blocktags), S(blocktags), sizeof(struct kw), (stfu)casort);
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
/* look for a token in the html block tag list
|
51
|
+
*/
|
52
|
+
struct kw*
|
53
|
+
mkd_search_tags(char *pat, int len)
|
54
|
+
{
|
55
|
+
struct kw key;
|
56
|
+
|
57
|
+
key.id = pat;
|
58
|
+
key.size = len;
|
59
|
+
|
60
|
+
return bsearch(&key, T(blocktags), S(blocktags), sizeof key, (stfu)casort);
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
/* load in the standard collection of html tags that markdown supports
|
65
|
+
*/
|
66
|
+
void
|
67
|
+
mkd_prepare_tags()
|
68
|
+
{
|
69
|
+
|
70
|
+
#define KW(x) mkd_define_tag(x, 0)
|
71
|
+
#define SC(x) mkd_define_tag(x, 1)
|
72
|
+
|
73
|
+
static int populated = 0;
|
74
|
+
|
75
|
+
if ( populated ) return;
|
76
|
+
populated = 1;
|
77
|
+
|
78
|
+
KW("STYLE");
|
79
|
+
KW("SCRIPT");
|
80
|
+
KW("ADDRESS");
|
81
|
+
KW("BDO");
|
82
|
+
KW("BLOCKQUOTE");
|
83
|
+
KW("CENTER");
|
84
|
+
KW("DFN");
|
85
|
+
KW("DIV");
|
86
|
+
KW("H1");
|
87
|
+
KW("H2");
|
88
|
+
KW("H3");
|
89
|
+
KW("H4");
|
90
|
+
KW("H5");
|
91
|
+
KW("H6");
|
92
|
+
KW("LISTING");
|
93
|
+
KW("NOBR");
|
94
|
+
KW("UL");
|
95
|
+
KW("P");
|
96
|
+
KW("OL");
|
97
|
+
KW("DL");
|
98
|
+
KW("PLAINTEXT");
|
99
|
+
KW("PRE");
|
100
|
+
KW("TABLE");
|
101
|
+
KW("WBR");
|
102
|
+
KW("XMP");
|
103
|
+
SC("HR");
|
104
|
+
SC("BR");
|
105
|
+
KW("IFRAME");
|
106
|
+
KW("MAP");
|
107
|
+
|
108
|
+
mkd_sort_tags();
|
109
|
+
} /* mkd_prepare_tags */
|
data/ext/tags.h
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
/* block-level tags for passing html blocks through the blender
|
2
|
+
*/
|
3
|
+
#ifndef _TAGS_D
|
4
|
+
#define _TAGS_D
|
5
|
+
|
6
|
+
struct kw {
|
7
|
+
char *id;
|
8
|
+
int size;
|
9
|
+
int selfclose;
|
10
|
+
} ;
|
11
|
+
|
12
|
+
|
13
|
+
struct kw* mkd_search_tags(char *, int);
|
14
|
+
void mkd_prepare_tags();
|
15
|
+
void mkd_sort_tags();
|
16
|
+
void mkd_define_tag(char *, int);
|
17
|
+
|
18
|
+
#endif
|
data/lib/rdiscount.rb
CHANGED
data/man/rdiscount.1
CHANGED
@@ -1,23 +1,22 @@
|
|
1
|
-
.\" generated with Ronn/v0.
|
1
|
+
.\" generated with Ronn/v0.6.8
|
2
2
|
.\" http://github.com/rtomayko/ronn/
|
3
3
|
.
|
4
4
|
.TH "RDISCOUNT" "1" "April 2010" "" "RUBY"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
|
-
\fBrdiscount\fR
|
7
|
+
\fBrdiscount\fR \- humane markup to HTML conversion tool
|
8
8
|
.
|
9
9
|
.SH "SYNOPSIS"
|
10
|
-
\fBrdiscount\fR [\fIfile\fR
|
10
|
+
\fBrdiscount\fR [\fIfile\fR\.\.\.]
|
11
11
|
.
|
12
12
|
.SH "DESCRIPTION"
|
13
|
-
The \fBrdiscount\fR utility reads one or more markdown(7)\-formatted text \fIfile\fRs and
|
14
|
-
writes HTML to standard output. With no \fIfile\fR, or when \fIfile\fR is '\-', \fBrdiscount\fR reads source text from standard input.
|
13
|
+
The \fBrdiscount\fR utility reads one or more markdown(7)\-formatted text \fIfile\fRs and writes HTML to standard output\. With no \fIfile\fR, or when \fIfile\fR is \'\-\', \fBrdiscount\fR reads source text from standard input\.
|
15
14
|
.
|
16
15
|
.SH "RETURN VALUES"
|
17
|
-
The \fBrdiscount\fR utility exits 0 on success, and > 0 if an error occurs
|
16
|
+
The \fBrdiscount\fR utility exits 0 on success, and > 0 if an error occurs\.
|
18
17
|
.
|
19
18
|
.SH "SEE ALSO"
|
20
19
|
markdown(7)
|
21
20
|
.
|
22
21
|
.SH "AUTHOR"
|
23
|
-
Ryan Tomayko \fIhttp://tomayko
|
22
|
+
Ryan Tomayko \fIhttp://tomayko\.com/about\fR
|
data/rdiscount.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'rdiscount'
|
3
|
-
s.version = '1.6.
|
3
|
+
s.version = '1.6.5'
|
4
4
|
s.summary = "Fast Implementation of Gruber's Markdown in C"
|
5
|
-
s.date = '2010-
|
6
|
-
s.email = '
|
5
|
+
s.date = '2010-06-15'
|
6
|
+
s.email = 'rtomayko@gmail.com'
|
7
7
|
s.homepage = 'http://github.com/rtomayko/rdiscount'
|
8
8
|
s.has_rdoc = true
|
9
9
|
s.authors = ["Ryan Tomayko", "David Loren Parsons", "Andrew White"]
|
@@ -24,12 +24,15 @@ Gem::Specification.new do |s|
|
|
24
24
|
ext/emmatch.c
|
25
25
|
ext/extconf.rb
|
26
26
|
ext/generate.c
|
27
|
+
ext/html5.c
|
27
28
|
ext/markdown.c
|
28
29
|
ext/markdown.h
|
29
30
|
ext/mkdio.c
|
30
31
|
ext/mkdio.h
|
31
32
|
ext/rdiscount.c
|
32
33
|
ext/resource.c
|
34
|
+
ext/tags.c
|
35
|
+
ext/tags.h
|
33
36
|
ext/toc.c
|
34
37
|
ext/xml.c
|
35
38
|
lib/markdown.rb
|
metadata
CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 1.6.3.2
|
8
|
+
- 5
|
9
|
+
version: 1.6.5
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Ryan Tomayko
|
@@ -17,12 +16,12 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-
|
19
|
+
date: 2010-06-15 00:00:00 -07:00
|
21
20
|
default_executable:
|
22
21
|
dependencies: []
|
23
22
|
|
24
23
|
description:
|
25
|
-
email:
|
24
|
+
email: rtomayko@gmail.com
|
26
25
|
executables:
|
27
26
|
- rdiscount
|
28
27
|
extensions:
|
@@ -45,12 +44,15 @@ files:
|
|
45
44
|
- ext/emmatch.c
|
46
45
|
- ext/extconf.rb
|
47
46
|
- ext/generate.c
|
47
|
+
- ext/html5.c
|
48
48
|
- ext/markdown.c
|
49
49
|
- ext/markdown.h
|
50
50
|
- ext/mkdio.c
|
51
51
|
- ext/mkdio.h
|
52
52
|
- ext/rdiscount.c
|
53
53
|
- ext/resource.c
|
54
|
+
- ext/tags.c
|
55
|
+
- ext/tags.h
|
54
56
|
- ext/toc.c
|
55
57
|
- ext/xml.c
|
56
58
|
- lib/markdown.rb
|