commonmarker 0.17.11 → 0.17.12
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of commonmarker might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/commonmarker/arena.c +2 -2
- data/ext/commonmarker/autolink.h +3 -3
- data/ext/commonmarker/blocks.c +1 -1
- data/ext/commonmarker/buffer.h +23 -23
- data/ext/commonmarker/chunk.h +1 -1
- data/ext/commonmarker/cmark-gfm-core-extensions.h +25 -0
- data/ext/commonmarker/{cmark_extension_api.h → cmark-gfm-extension_api.h} +67 -67
- data/ext/commonmarker/cmark-gfm-extensions_export.h +42 -0
- data/ext/commonmarker/{cmark.h → cmark-gfm.h} +88 -88
- data/ext/commonmarker/cmark-gfm_export.h +42 -0
- data/ext/commonmarker/cmark-gfm_version.h +7 -0
- data/ext/commonmarker/cmark.c +3 -3
- data/ext/commonmarker/cmark_ctype.h +6 -6
- data/ext/commonmarker/commonmark.c +2 -2
- data/ext/commonmarker/commonmarker.c +5 -5
- data/ext/commonmarker/commonmarker.h +1 -1
- data/ext/commonmarker/core-extensions.c +2 -2
- data/ext/commonmarker/ext_scanners.h +1 -1
- data/ext/commonmarker/footnotes.c +1 -1
- data/ext/commonmarker/houdini.h +6 -6
- data/ext/commonmarker/houdini_href_e.c +2 -2
- data/ext/commonmarker/html.c +1 -1
- data/ext/commonmarker/inlines.c +1 -1
- data/ext/commonmarker/inlines.h +1 -1
- data/ext/commonmarker/iterator.c +1 -1
- data/ext/commonmarker/iterator.h +1 -1
- data/ext/commonmarker/latex.c +1 -1
- data/ext/commonmarker/linked_list.c +1 -1
- data/ext/commonmarker/man.c +1 -1
- data/ext/commonmarker/node.h +4 -4
- data/ext/commonmarker/plugin.h +2 -2
- data/ext/commonmarker/references.c +1 -1
- data/ext/commonmarker/registry.c +1 -1
- data/ext/commonmarker/registry.h +4 -4
- data/ext/commonmarker/render.c +1 -1
- data/ext/commonmarker/scanners.h +1 -1
- data/ext/commonmarker/strikethrough.c +1 -2
- data/ext/commonmarker/strikethrough.h +3 -3
- data/ext/commonmarker/syntax_extension.c +1 -1
- data/ext/commonmarker/syntax_extension.h +2 -2
- data/ext/commonmarker/table.c +10 -5
- data/ext/commonmarker/table.h +3 -3
- data/ext/commonmarker/tagfilter.h +3 -3
- data/ext/commonmarker/utf8.h +6 -6
- data/ext/commonmarker/xml.c +1 -1
- data/lib/commonmarker/renderer/html_renderer.rb +5 -5
- data/lib/commonmarker/version.rb +1 -2
- data/test/test_extensions.rb +3 -1
- metadata +8 -8
- data/ext/commonmarker/cmark_export.h +0 -42
- data/ext/commonmarker/cmark_version.h +0 -8
- data/ext/commonmarker/cmarkextensions_export.h +0 -42
- data/ext/commonmarker/core-extensions.h +0 -25
data/ext/commonmarker/table.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#include <
|
1
|
+
#include <cmark-gfm-extension_api.h>
|
2
2
|
#include <html.h>
|
3
3
|
#include <inlines.h>
|
4
4
|
#include <parser.h>
|
@@ -578,10 +578,15 @@ static void html_render(cmark_syntax_extension *extension,
|
|
578
578
|
cmark_strbuf_putc(html, '>');
|
579
579
|
table_state->need_closing_table_body = false;
|
580
580
|
} else {
|
581
|
-
if (table_state->need_closing_table_body)
|
581
|
+
if (table_state->need_closing_table_body) {
|
582
|
+
cmark_html_render_cr(html);
|
582
583
|
cmark_strbuf_puts(html, "</tbody>");
|
584
|
+
cmark_html_render_cr(html);
|
585
|
+
}
|
583
586
|
table_state->need_closing_table_body = false;
|
584
|
-
|
587
|
+
cmark_html_render_cr(html);
|
588
|
+
cmark_strbuf_puts(html, "</table>");
|
589
|
+
cmark_html_render_cr(html);
|
585
590
|
}
|
586
591
|
} else if (node->type == CMARK_NODE_TABLE_ROW) {
|
587
592
|
if (entering) {
|
@@ -680,14 +685,14 @@ cmark_syntax_extension *create_table_extension(void) {
|
|
680
685
|
return self;
|
681
686
|
}
|
682
687
|
|
683
|
-
uint16_t
|
688
|
+
uint16_t cmark_gfm_extensions_get_table_columns(cmark_node *node) {
|
684
689
|
if (node->type != CMARK_NODE_TABLE)
|
685
690
|
return 0;
|
686
691
|
|
687
692
|
return ((node_table *)node->as.opaque)->n_columns;
|
688
693
|
}
|
689
694
|
|
690
|
-
uint8_t *
|
695
|
+
uint8_t *cmark_gfm_extensions_get_table_alignments(cmark_node *node) {
|
691
696
|
if (node->type != CMARK_NODE_TABLE)
|
692
697
|
return 0;
|
693
698
|
|
data/ext/commonmarker/table.h
CHANGED
data/ext/commonmarker/utf8.h
CHANGED
@@ -8,24 +8,24 @@
|
|
8
8
|
extern "C" {
|
9
9
|
#endif
|
10
10
|
|
11
|
-
|
11
|
+
CMARK_GFM_EXPORT
|
12
12
|
void cmark_utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str,
|
13
13
|
bufsize_t len);
|
14
14
|
|
15
|
-
|
15
|
+
CMARK_GFM_EXPORT
|
16
16
|
void cmark_utf8proc_encode_char(int32_t uc, cmark_strbuf *buf);
|
17
17
|
|
18
|
-
|
18
|
+
CMARK_GFM_EXPORT
|
19
19
|
int cmark_utf8proc_iterate(const uint8_t *str, bufsize_t str_len, int32_t *dst);
|
20
20
|
|
21
|
-
|
21
|
+
CMARK_GFM_EXPORT
|
22
22
|
void cmark_utf8proc_check(cmark_strbuf *dest, const uint8_t *line,
|
23
23
|
bufsize_t size);
|
24
24
|
|
25
|
-
|
25
|
+
CMARK_GFM_EXPORT
|
26
26
|
int cmark_utf8proc_is_space(int32_t uc);
|
27
27
|
|
28
|
-
|
28
|
+
CMARK_GFM_EXPORT
|
29
29
|
int cmark_utf8proc_is_punctuation(int32_t uc);
|
30
30
|
|
31
31
|
#ifdef __cplusplus
|
data/ext/commonmarker/xml.c
CHANGED
@@ -174,7 +174,7 @@ module CommonMarker
|
|
174
174
|
@alignments = node.table_alignments
|
175
175
|
@needs_close_tbody = false
|
176
176
|
out("<table#{sourcepos(node)}>\n", :children)
|
177
|
-
out("</tbody
|
177
|
+
out("</tbody>\n") if @needs_close_tbody
|
178
178
|
out("</table>\n")
|
179
179
|
end
|
180
180
|
|
@@ -182,7 +182,7 @@ module CommonMarker
|
|
182
182
|
@column_index = 0
|
183
183
|
|
184
184
|
@in_header = true
|
185
|
-
out("<thead>\n<tr#{sourcepos(node)}
|
185
|
+
out("<thead>\n<tr#{sourcepos(node)}>\n", :children, "</tr>\n</thead>\n")
|
186
186
|
@in_header = false
|
187
187
|
end
|
188
188
|
|
@@ -190,9 +190,9 @@ module CommonMarker
|
|
190
190
|
@column_index = 0
|
191
191
|
if !@in_header && !@needs_close_tbody
|
192
192
|
@needs_close_tbody = true
|
193
|
-
out("
|
193
|
+
out("<tbody>\n")
|
194
194
|
end
|
195
|
-
out("
|
195
|
+
out("<tr#{sourcepos(node)}>\n", :children, "</tr>\n")
|
196
196
|
end
|
197
197
|
|
198
198
|
def table_cell(node)
|
@@ -202,7 +202,7 @@ module CommonMarker
|
|
202
202
|
when :center; ' align="center"'
|
203
203
|
else; ''
|
204
204
|
end
|
205
|
-
out(@in_header ? "
|
205
|
+
out(@in_header ? "<th#{align}#{sourcepos(node)}>" : "<td#{align}#{sourcepos(node)}>", :children, @in_header ? "</th>\n" : "</td>\n")
|
206
206
|
@column_index += 1
|
207
207
|
end
|
208
208
|
|
data/lib/commonmarker/version.rb
CHANGED
data/test/test_extensions.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonmarker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-enum
|
@@ -131,20 +131,20 @@ files:
|
|
131
131
|
- ext/commonmarker/buffer.h
|
132
132
|
- ext/commonmarker/case_fold_switch.inc
|
133
133
|
- ext/commonmarker/chunk.h
|
134
|
+
- ext/commonmarker/cmark-gfm-core-extensions.h
|
135
|
+
- ext/commonmarker/cmark-gfm-extension_api.h
|
136
|
+
- ext/commonmarker/cmark-gfm-extensions_export.h
|
137
|
+
- ext/commonmarker/cmark-gfm.h
|
138
|
+
- ext/commonmarker/cmark-gfm_export.h
|
139
|
+
- ext/commonmarker/cmark-gfm_version.h
|
134
140
|
- ext/commonmarker/cmark.c
|
135
|
-
- ext/commonmarker/cmark.h
|
136
141
|
- ext/commonmarker/cmark_ctype.c
|
137
142
|
- ext/commonmarker/cmark_ctype.h
|
138
|
-
- ext/commonmarker/cmark_export.h
|
139
|
-
- ext/commonmarker/cmark_extension_api.h
|
140
|
-
- ext/commonmarker/cmark_version.h
|
141
|
-
- ext/commonmarker/cmarkextensions_export.h
|
142
143
|
- ext/commonmarker/commonmark.c
|
143
144
|
- ext/commonmarker/commonmarker.c
|
144
145
|
- ext/commonmarker/commonmarker.h
|
145
146
|
- ext/commonmarker/config.h
|
146
147
|
- ext/commonmarker/core-extensions.c
|
147
|
-
- ext/commonmarker/core-extensions.h
|
148
148
|
- ext/commonmarker/entities.inc
|
149
149
|
- ext/commonmarker/ext_scanners.c
|
150
150
|
- ext/commonmarker/ext_scanners.h
|
@@ -1,42 +0,0 @@
|
|
1
|
-
|
2
|
-
#ifndef CMARK_EXPORT_H
|
3
|
-
#define CMARK_EXPORT_H
|
4
|
-
|
5
|
-
#ifdef CMARK_STATIC_DEFINE
|
6
|
-
# define CMARK_EXPORT
|
7
|
-
# define CMARK_NO_EXPORT
|
8
|
-
#else
|
9
|
-
# ifndef CMARK_EXPORT
|
10
|
-
# ifdef libcmark_gfm_EXPORTS
|
11
|
-
/* We are building this library */
|
12
|
-
# define CMARK_EXPORT __attribute__((visibility("default")))
|
13
|
-
# else
|
14
|
-
/* We are using this library */
|
15
|
-
# define CMARK_EXPORT __attribute__((visibility("default")))
|
16
|
-
# endif
|
17
|
-
# endif
|
18
|
-
|
19
|
-
# ifndef CMARK_NO_EXPORT
|
20
|
-
# define CMARK_NO_EXPORT __attribute__((visibility("hidden")))
|
21
|
-
# endif
|
22
|
-
#endif
|
23
|
-
|
24
|
-
#ifndef CMARK_DEPRECATED
|
25
|
-
# define CMARK_DEPRECATED __attribute__ ((__deprecated__))
|
26
|
-
#endif
|
27
|
-
|
28
|
-
#ifndef CMARK_DEPRECATED_EXPORT
|
29
|
-
# define CMARK_DEPRECATED_EXPORT CMARK_EXPORT CMARK_DEPRECATED
|
30
|
-
#endif
|
31
|
-
|
32
|
-
#ifndef CMARK_DEPRECATED_NO_EXPORT
|
33
|
-
# define CMARK_DEPRECATED_NO_EXPORT CMARK_NO_EXPORT CMARK_DEPRECATED
|
34
|
-
#endif
|
35
|
-
|
36
|
-
#if 0 /* DEFINE_NO_DEPRECATED */
|
37
|
-
# ifndef CMARK_NO_DEPRECATED
|
38
|
-
# define CMARK_NO_DEPRECATED
|
39
|
-
# endif
|
40
|
-
#endif
|
41
|
-
|
42
|
-
#endif
|
@@ -1,42 +0,0 @@
|
|
1
|
-
|
2
|
-
#ifndef CMARKEXTENSIONS_EXPORT_H
|
3
|
-
#define CMARKEXTENSIONS_EXPORT_H
|
4
|
-
|
5
|
-
#ifdef CMARKEXTENSIONS_STATIC_DEFINE
|
6
|
-
# define CMARKEXTENSIONS_EXPORT
|
7
|
-
# define CMARKEXTENSIONS_NO_EXPORT
|
8
|
-
#else
|
9
|
-
# ifndef CMARKEXTENSIONS_EXPORT
|
10
|
-
# ifdef libcmark_gfmextensions_EXPORTS
|
11
|
-
/* We are building this library */
|
12
|
-
# define CMARKEXTENSIONS_EXPORT __attribute__((visibility("default")))
|
13
|
-
# else
|
14
|
-
/* We are using this library */
|
15
|
-
# define CMARKEXTENSIONS_EXPORT __attribute__((visibility("default")))
|
16
|
-
# endif
|
17
|
-
# endif
|
18
|
-
|
19
|
-
# ifndef CMARKEXTENSIONS_NO_EXPORT
|
20
|
-
# define CMARKEXTENSIONS_NO_EXPORT __attribute__((visibility("hidden")))
|
21
|
-
# endif
|
22
|
-
#endif
|
23
|
-
|
24
|
-
#ifndef CMARKEXTENSIONS_DEPRECATED
|
25
|
-
# define CMARKEXTENSIONS_DEPRECATED __attribute__ ((__deprecated__))
|
26
|
-
#endif
|
27
|
-
|
28
|
-
#ifndef CMARKEXTENSIONS_DEPRECATED_EXPORT
|
29
|
-
# define CMARKEXTENSIONS_DEPRECATED_EXPORT CMARKEXTENSIONS_EXPORT CMARKEXTENSIONS_DEPRECATED
|
30
|
-
#endif
|
31
|
-
|
32
|
-
#ifndef CMARKEXTENSIONS_DEPRECATED_NO_EXPORT
|
33
|
-
# define CMARKEXTENSIONS_DEPRECATED_NO_EXPORT CMARKEXTENSIONS_NO_EXPORT CMARKEXTENSIONS_DEPRECATED
|
34
|
-
#endif
|
35
|
-
|
36
|
-
#if 0 /* DEFINE_NO_DEPRECATED */
|
37
|
-
# ifndef CMARKEXTENSIONS_NO_DEPRECATED
|
38
|
-
# define CMARKEXTENSIONS_NO_DEPRECATED
|
39
|
-
# endif
|
40
|
-
#endif
|
41
|
-
|
42
|
-
#endif
|
@@ -1,25 +0,0 @@
|
|
1
|
-
#ifndef CORE_EXTENSIONS_H
|
2
|
-
#define CORE_EXTENSIONS_H
|
3
|
-
|
4
|
-
#ifdef __cplusplus
|
5
|
-
extern "C" {
|
6
|
-
#endif
|
7
|
-
|
8
|
-
#include "cmark_extension_api.h"
|
9
|
-
#include "cmarkextensions_export.h"
|
10
|
-
#include <stdint.h>
|
11
|
-
|
12
|
-
CMARKEXTENSIONS_EXPORT
|
13
|
-
void core_extensions_ensure_registered(void);
|
14
|
-
|
15
|
-
CMARKEXTENSIONS_EXPORT
|
16
|
-
uint16_t cmarkextensions_get_table_columns(cmark_node *node);
|
17
|
-
|
18
|
-
CMARKEXTENSIONS_EXPORT
|
19
|
-
uint8_t *cmarkextensions_get_table_alignments(cmark_node *node);
|
20
|
-
|
21
|
-
#ifdef __cplusplus
|
22
|
-
}
|
23
|
-
#endif
|
24
|
-
|
25
|
-
#endif
|