nano-pure-box 0.0.1
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.
- checksums.yaml +7 -0
- data/nano-pure-box.gemspec +12 -0
- data/redcarpet-3.6.1/CHANGELOG.md +487 -0
- data/redcarpet-3.6.1/CONTRIBUTING.md +33 -0
- data/redcarpet-3.6.1/COPYING +20 -0
- data/redcarpet-3.6.1/Gemfile +9 -0
- data/redcarpet-3.6.1/README.markdown +405 -0
- data/redcarpet-3.6.1/Rakefile +60 -0
- data/redcarpet-3.6.1/bin/redcarpet +7 -0
- data/redcarpet-3.6.1/ext/redcarpet/autolink.c +308 -0
- data/redcarpet-3.6.1/ext/redcarpet/autolink.h +55 -0
- data/redcarpet-3.6.1/ext/redcarpet/buffer.c +203 -0
- data/redcarpet-3.6.1/ext/redcarpet/buffer.h +88 -0
- data/redcarpet-3.6.1/ext/redcarpet/extconf.rb +6 -0
- data/redcarpet-3.6.1/ext/redcarpet/houdini.h +51 -0
- data/redcarpet-3.6.1/ext/redcarpet/houdini_href_e.c +124 -0
- data/redcarpet-3.6.1/ext/redcarpet/houdini_html_e.c +104 -0
- data/redcarpet-3.6.1/ext/redcarpet/html.c +869 -0
- data/redcarpet-3.6.1/ext/redcarpet/html.h +83 -0
- data/redcarpet-3.6.1/ext/redcarpet/html_block_names.txt +44 -0
- data/redcarpet-3.6.1/ext/redcarpet/html_blocks.h +222 -0
- data/redcarpet-3.6.1/ext/redcarpet/html_smartypants.c +472 -0
- data/redcarpet-3.6.1/ext/redcarpet/markdown.c +2946 -0
- data/redcarpet-3.6.1/ext/redcarpet/markdown.h +143 -0
- data/redcarpet-3.6.1/ext/redcarpet/rc_markdown.c +194 -0
- data/redcarpet-3.6.1/ext/redcarpet/rc_render.c +601 -0
- data/redcarpet-3.6.1/ext/redcarpet/redcarpet.h +54 -0
- data/redcarpet-3.6.1/ext/redcarpet/stack.c +84 -0
- data/redcarpet-3.6.1/ext/redcarpet/stack.h +48 -0
- data/redcarpet-3.6.1/lib/redcarpet/cli.rb +86 -0
- data/redcarpet-3.6.1/lib/redcarpet/compat.rb +71 -0
- data/redcarpet-3.6.1/lib/redcarpet/render_man.rb +65 -0
- data/redcarpet-3.6.1/lib/redcarpet/render_strip.rb +60 -0
- data/redcarpet-3.6.1/lib/redcarpet.rb +92 -0
- data/redcarpet-3.6.1/redcarpet.gemspec +59 -0
- metadata +75 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2009, Natacha Porté
|
|
3
|
+
* Copyright (c) 2015, Vicent Marti
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
* furnished to do so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
|
13
|
+
* all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
* THE SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#ifndef MARKDOWN_H__
|
|
25
|
+
#define MARKDOWN_H__
|
|
26
|
+
|
|
27
|
+
#include "buffer.h"
|
|
28
|
+
#include "autolink.h"
|
|
29
|
+
|
|
30
|
+
#ifdef __cplusplus
|
|
31
|
+
extern "C" {
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
/********************
|
|
35
|
+
* TYPE DEFINITIONS *
|
|
36
|
+
********************/
|
|
37
|
+
|
|
38
|
+
/* mkd_autolink - type of autolink */
|
|
39
|
+
enum mkd_autolink {
|
|
40
|
+
MKDA_NOT_AUTOLINK, /* used internally when it is not an autolink*/
|
|
41
|
+
MKDA_NORMAL, /* normal http/http/ftp/mailto/etc link */
|
|
42
|
+
MKDA_EMAIL, /* e-mail link without explit mailto: */
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
enum mkd_tableflags {
|
|
46
|
+
MKD_TABLE_ALIGN_L = 1,
|
|
47
|
+
MKD_TABLE_ALIGN_R = 2,
|
|
48
|
+
MKD_TABLE_ALIGN_CENTER = 3,
|
|
49
|
+
MKD_TABLE_ALIGNMASK = 3,
|
|
50
|
+
MKD_TABLE_HEADER = 4
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
enum mkd_extensions {
|
|
54
|
+
MKDEXT_NO_INTRA_EMPHASIS = (1 << 0),
|
|
55
|
+
MKDEXT_TABLES = (1 << 1),
|
|
56
|
+
MKDEXT_FENCED_CODE = (1 << 2),
|
|
57
|
+
MKDEXT_AUTOLINK = (1 << 3),
|
|
58
|
+
MKDEXT_STRIKETHROUGH = (1 << 4),
|
|
59
|
+
MKDEXT_UNDERLINE = (1 << 5),
|
|
60
|
+
MKDEXT_SPACE_HEADERS = (1 << 6),
|
|
61
|
+
MKDEXT_SUPERSCRIPT = (1 << 7),
|
|
62
|
+
MKDEXT_LAX_SPACING = (1 << 8),
|
|
63
|
+
MKDEXT_DISABLE_INDENTED_CODE = (1 << 9),
|
|
64
|
+
MKDEXT_HIGHLIGHT = (1 << 10),
|
|
65
|
+
MKDEXT_FOOTNOTES = (1 << 11),
|
|
66
|
+
MKDEXT_QUOTE = (1 << 12)
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/* sd_callbacks - functions for rendering parsed data */
|
|
70
|
+
struct sd_callbacks {
|
|
71
|
+
/* block level callbacks - NULL skips the block */
|
|
72
|
+
void (*blockcode)(struct buf *ob, const struct buf *text, const struct buf *lang, void *opaque);
|
|
73
|
+
void (*blockquote)(struct buf *ob, const struct buf *text, void *opaque);
|
|
74
|
+
void (*blockhtml)(struct buf *ob,const struct buf *text, void *opaque);
|
|
75
|
+
void (*header)(struct buf *ob, const struct buf *text, int level, void *opaque);
|
|
76
|
+
void (*hrule)(struct buf *ob, void *opaque);
|
|
77
|
+
void (*list)(struct buf *ob, const struct buf *text, int flags, void *opaque);
|
|
78
|
+
void (*listitem)(struct buf *ob, const struct buf *text, int flags, void *opaque);
|
|
79
|
+
void (*paragraph)(struct buf *ob, const struct buf *text, void *opaque);
|
|
80
|
+
void (*table)(struct buf *ob, const struct buf *header, const struct buf *body, void *opaque);
|
|
81
|
+
void (*table_row)(struct buf *ob, const struct buf *text, void *opaque);
|
|
82
|
+
void (*table_cell)(struct buf *ob, const struct buf *text, int flags, void *opaque);
|
|
83
|
+
void (*footnotes)(struct buf *ob, const struct buf *text, void *opaque);
|
|
84
|
+
void (*footnote_def)(struct buf *ob, const struct buf *text, unsigned int num, void *opaque);
|
|
85
|
+
|
|
86
|
+
/* span level callbacks - NULL or return 0 prints the span verbatim */
|
|
87
|
+
int (*autolink)(struct buf *ob, const struct buf *link, enum mkd_autolink type, void *opaque);
|
|
88
|
+
int (*codespan)(struct buf *ob, const struct buf *text, void *opaque);
|
|
89
|
+
int (*double_emphasis)(struct buf *ob, const struct buf *text, void *opaque);
|
|
90
|
+
int (*emphasis)(struct buf *ob, const struct buf *text, void *opaque);
|
|
91
|
+
int (*underline)(struct buf *ob, const struct buf *text, void *opaque);
|
|
92
|
+
int (*highlight)(struct buf *ob, const struct buf *text, void *opaque);
|
|
93
|
+
int (*quote)(struct buf *ob, const struct buf *text, void *opaque);
|
|
94
|
+
int (*image)(struct buf *ob, const struct buf *link, const struct buf *title, const struct buf *alt, void *opaque);
|
|
95
|
+
int (*linebreak)(struct buf *ob, void *opaque);
|
|
96
|
+
int (*link)(struct buf *ob, const struct buf *link, const struct buf *title, const struct buf *content, void *opaque);
|
|
97
|
+
int (*raw_html_tag)(struct buf *ob, const struct buf *tag, void *opaque);
|
|
98
|
+
int (*triple_emphasis)(struct buf *ob, const struct buf *text, void *opaque);
|
|
99
|
+
int (*strikethrough)(struct buf *ob, const struct buf *text, void *opaque);
|
|
100
|
+
int (*superscript)(struct buf *ob, const struct buf *text, void *opaque);
|
|
101
|
+
int (*footnote_ref)(struct buf *ob, unsigned int num, void *opaque);
|
|
102
|
+
|
|
103
|
+
/* low level callbacks - NULL copies input directly into the output */
|
|
104
|
+
void (*entity)(struct buf *ob, const struct buf *entity, void *opaque);
|
|
105
|
+
void (*normal_text)(struct buf *ob, const struct buf *text, void *opaque);
|
|
106
|
+
|
|
107
|
+
/* header and footer */
|
|
108
|
+
void (*doc_header)(struct buf *ob, void *opaque);
|
|
109
|
+
void (*doc_footer)(struct buf *ob, void *opaque);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
struct sd_markdown;
|
|
113
|
+
|
|
114
|
+
/*********
|
|
115
|
+
* FLAGS *
|
|
116
|
+
*********/
|
|
117
|
+
|
|
118
|
+
/* list/listitem flags */
|
|
119
|
+
#define MKD_LIST_ORDERED 1
|
|
120
|
+
#define MKD_LI_BLOCK 2 /* <li> containing block data */
|
|
121
|
+
|
|
122
|
+
/**********************
|
|
123
|
+
* EXPORTED FUNCTIONS *
|
|
124
|
+
**********************/
|
|
125
|
+
|
|
126
|
+
extern struct sd_markdown *
|
|
127
|
+
sd_markdown_new(
|
|
128
|
+
unsigned int extensions,
|
|
129
|
+
size_t max_nesting,
|
|
130
|
+
const struct sd_callbacks *callbacks,
|
|
131
|
+
void *opaque);
|
|
132
|
+
|
|
133
|
+
extern void
|
|
134
|
+
sd_markdown_render(struct buf *ob, const uint8_t *document, size_t doc_size, struct sd_markdown *md);
|
|
135
|
+
|
|
136
|
+
extern void
|
|
137
|
+
sd_markdown_free(struct sd_markdown *md);
|
|
138
|
+
|
|
139
|
+
#ifdef __cplusplus
|
|
140
|
+
}
|
|
141
|
+
#endif
|
|
142
|
+
|
|
143
|
+
#endif
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2015, Vicent Marti
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in
|
|
12
|
+
* all copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
+
* THE SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
#include "redcarpet.h"
|
|
24
|
+
|
|
25
|
+
VALUE rb_mRedcarpet;
|
|
26
|
+
VALUE rb_cMarkdown;
|
|
27
|
+
VALUE rb_cRenderHTML_TOC;
|
|
28
|
+
|
|
29
|
+
extern VALUE rb_cRenderBase;
|
|
30
|
+
|
|
31
|
+
static void rb_redcarpet_md_flags(VALUE hash, unsigned int *enabled_extensions_p)
|
|
32
|
+
{
|
|
33
|
+
unsigned int extensions = 0;
|
|
34
|
+
|
|
35
|
+
Check_Type(hash, T_HASH);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Markdown extensions -- all disabled by default
|
|
39
|
+
*/
|
|
40
|
+
if (rb_hash_lookup(hash, CSTR2SYM("no_intra_emphasis")) == Qtrue)
|
|
41
|
+
extensions |= MKDEXT_NO_INTRA_EMPHASIS;
|
|
42
|
+
|
|
43
|
+
if (rb_hash_lookup(hash, CSTR2SYM("tables")) == Qtrue)
|
|
44
|
+
extensions |= MKDEXT_TABLES;
|
|
45
|
+
|
|
46
|
+
if (rb_hash_lookup(hash, CSTR2SYM("fenced_code_blocks")) == Qtrue)
|
|
47
|
+
extensions |= MKDEXT_FENCED_CODE;
|
|
48
|
+
|
|
49
|
+
if (rb_hash_lookup(hash, CSTR2SYM("disable_indented_code_blocks")) == Qtrue)
|
|
50
|
+
extensions |= MKDEXT_DISABLE_INDENTED_CODE;
|
|
51
|
+
|
|
52
|
+
if (rb_hash_lookup(hash, CSTR2SYM("autolink")) == Qtrue)
|
|
53
|
+
extensions |= MKDEXT_AUTOLINK;
|
|
54
|
+
|
|
55
|
+
if (rb_hash_lookup(hash, CSTR2SYM("strikethrough")) == Qtrue)
|
|
56
|
+
extensions |= MKDEXT_STRIKETHROUGH;
|
|
57
|
+
|
|
58
|
+
if (rb_hash_lookup(hash, CSTR2SYM("underline")) == Qtrue)
|
|
59
|
+
extensions |= MKDEXT_UNDERLINE;
|
|
60
|
+
|
|
61
|
+
if (rb_hash_lookup(hash, CSTR2SYM("highlight")) == Qtrue)
|
|
62
|
+
extensions |= MKDEXT_HIGHLIGHT;
|
|
63
|
+
|
|
64
|
+
if (rb_hash_lookup(hash, CSTR2SYM("quote")) == Qtrue)
|
|
65
|
+
extensions |= MKDEXT_QUOTE;
|
|
66
|
+
|
|
67
|
+
if (rb_hash_lookup(hash, CSTR2SYM("lax_spacing")) == Qtrue)
|
|
68
|
+
extensions |= MKDEXT_LAX_SPACING;
|
|
69
|
+
|
|
70
|
+
if (rb_hash_lookup(hash, CSTR2SYM("space_after_headers")) == Qtrue)
|
|
71
|
+
extensions |= MKDEXT_SPACE_HEADERS;
|
|
72
|
+
|
|
73
|
+
if (rb_hash_lookup(hash, CSTR2SYM("superscript")) == Qtrue)
|
|
74
|
+
extensions |= MKDEXT_SUPERSCRIPT;
|
|
75
|
+
|
|
76
|
+
if (rb_hash_lookup(hash, CSTR2SYM("footnotes")) == Qtrue)
|
|
77
|
+
extensions |= MKDEXT_FOOTNOTES;
|
|
78
|
+
|
|
79
|
+
*enabled_extensions_p = extensions;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static void
|
|
83
|
+
rb_redcarpet_md__free(void *markdown)
|
|
84
|
+
{
|
|
85
|
+
sd_markdown_free((struct sd_markdown *)markdown);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
static const rb_data_type_t rb_redcarpet_md__type = {
|
|
89
|
+
"Redcarpet/md",
|
|
90
|
+
{
|
|
91
|
+
NULL, // Nothing to mark
|
|
92
|
+
rb_redcarpet_md__free,
|
|
93
|
+
},
|
|
94
|
+
0,
|
|
95
|
+
0,
|
|
96
|
+
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED,
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
static VALUE rb_redcarpet_md__new(int argc, VALUE *argv, VALUE klass)
|
|
100
|
+
{
|
|
101
|
+
VALUE rb_markdown, rb_rndr, hash, rndr_options;
|
|
102
|
+
unsigned int extensions = 0;
|
|
103
|
+
|
|
104
|
+
struct rb_redcarpet_rndr *rndr;
|
|
105
|
+
struct sd_markdown *markdown;
|
|
106
|
+
|
|
107
|
+
if (rb_scan_args(argc, argv, "11", &rb_rndr, &hash) == 2)
|
|
108
|
+
rb_redcarpet_md_flags(hash, &extensions);
|
|
109
|
+
|
|
110
|
+
if (rb_obj_is_kind_of(rb_rndr, rb_cClass))
|
|
111
|
+
rb_rndr = rb_funcall(rb_rndr, rb_intern("new"), 0);
|
|
112
|
+
|
|
113
|
+
if (!rb_obj_is_kind_of(rb_rndr, rb_cRenderBase))
|
|
114
|
+
rb_raise(rb_eTypeError, "Invalid Renderer instance given");
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Automatically enable the `fenced_code_blocks` option if
|
|
118
|
+
* given a kind of `HTML_TOC` object since many languages
|
|
119
|
+
* like Ruby use the sharp to comment code so these comments
|
|
120
|
+
* would be processed as titles.
|
|
121
|
+
*/
|
|
122
|
+
if (rb_obj_is_kind_of(rb_rndr, rb_cRenderHTML_TOC))
|
|
123
|
+
extensions |= MKDEXT_FENCED_CODE;
|
|
124
|
+
|
|
125
|
+
rndr = rb_redcarpet_rndr_unwrap(rb_rndr);
|
|
126
|
+
|
|
127
|
+
/* Merge the current options in the @options hash */
|
|
128
|
+
if (hash != Qnil) {
|
|
129
|
+
rndr_options = rb_funcall(rb_iv_get(rb_rndr, "@options"), rb_intern("merge"), 1, hash);
|
|
130
|
+
rb_iv_set(rb_rndr, "@options", rndr_options);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
markdown = sd_markdown_new(extensions, 16, &rndr->callbacks, &rndr->options);
|
|
134
|
+
if (!markdown)
|
|
135
|
+
rb_raise(rb_eRuntimeError, "Failed to create new Renderer class");
|
|
136
|
+
|
|
137
|
+
rb_markdown = TypedData_Wrap_Struct(klass, &rb_redcarpet_md__type, markdown);
|
|
138
|
+
rb_iv_set(rb_markdown, "@renderer", rb_rndr);
|
|
139
|
+
|
|
140
|
+
return rb_markdown;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static VALUE rb_redcarpet_md_render(VALUE self, VALUE text)
|
|
144
|
+
{
|
|
145
|
+
VALUE rb_rndr;
|
|
146
|
+
struct buf *output_buf;
|
|
147
|
+
struct sd_markdown *markdown;
|
|
148
|
+
|
|
149
|
+
Check_Type(text, T_STRING);
|
|
150
|
+
|
|
151
|
+
rb_rndr = rb_iv_get(self, "@renderer");
|
|
152
|
+
TypedData_Get_Struct(self, struct sd_markdown, &rb_redcarpet_md__type, markdown);
|
|
153
|
+
|
|
154
|
+
if (rb_respond_to(rb_rndr, rb_intern("preprocess")))
|
|
155
|
+
text = rb_funcall(rb_rndr, rb_intern("preprocess"), 1, text);
|
|
156
|
+
if (NIL_P(text))
|
|
157
|
+
return Qnil;
|
|
158
|
+
|
|
159
|
+
struct rb_redcarpet_rndr *renderer = rb_redcarpet_rndr_unwrap(rb_rndr);
|
|
160
|
+
renderer->options.active_enc = rb_enc_get(text);
|
|
161
|
+
|
|
162
|
+
/* initialize buffers */
|
|
163
|
+
output_buf = bufnew(128);
|
|
164
|
+
|
|
165
|
+
/* render the magic */
|
|
166
|
+
sd_markdown_render(
|
|
167
|
+
output_buf,
|
|
168
|
+
(const uint8_t*)RSTRING_PTR(text),
|
|
169
|
+
RSTRING_LEN(text),
|
|
170
|
+
markdown);
|
|
171
|
+
|
|
172
|
+
/* build the Ruby string */
|
|
173
|
+
text = rb_enc_str_new((const char*)output_buf->data, output_buf->size, rb_enc_get(text));
|
|
174
|
+
|
|
175
|
+
bufrelease(output_buf);
|
|
176
|
+
|
|
177
|
+
if (rb_respond_to(rb_rndr, rb_intern("postprocess")))
|
|
178
|
+
text = rb_funcall(rb_rndr, rb_intern("postprocess"), 1, text);
|
|
179
|
+
|
|
180
|
+
return text;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
__attribute__((visibility("default")))
|
|
184
|
+
void Init_redcarpet()
|
|
185
|
+
{
|
|
186
|
+
rb_mRedcarpet = rb_define_module("Redcarpet");
|
|
187
|
+
|
|
188
|
+
rb_cMarkdown = rb_define_class_under(rb_mRedcarpet, "Markdown", rb_cObject);
|
|
189
|
+
rb_undef_alloc_func(rb_cMarkdown);
|
|
190
|
+
rb_define_singleton_method(rb_cMarkdown, "new", rb_redcarpet_md__new, -1);
|
|
191
|
+
rb_define_method(rb_cMarkdown, "render", rb_redcarpet_md_render, 1);
|
|
192
|
+
|
|
193
|
+
Init_redcarpet_rndr();
|
|
194
|
+
}
|