commonmarker 0.17.1 → 0.17.2
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/cmark/CMakeLists.txt +1 -1
- data/ext/commonmarker/cmark/changelog.txt +4 -0
- data/ext/commonmarker/cmark/src/blocks.c +8 -4
- data/ext/commonmarker/cmark/src/inlines.c +6 -7
- data/ext/commonmarker/cmark/src/inlines.h +1 -1
- data/lib/commonmarker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49c0fe604d16fddab739a15eb88155c8e8258554
|
4
|
+
data.tar.gz: a6347c38e4659f38adea70964d62b6d31941f635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5668901959312c78aabe85779d9d06ae9bafe500477122f02d851ed28a77588eb3eead6a83286db29161905aed6feb4f36f22ed8f797deb4dec8eaa68043a6cc
|
7
|
+
data.tar.gz: 731052d3a802465eadd8473558d0a6a5b941252d74db531be6e9487f88ed7374e957170967f340e30916eb642fb322c5a11fa8fd03dc056f0b64e05302d497a5
|
@@ -19,7 +19,7 @@ set(PROJECT_NAME "cmark")
|
|
19
19
|
set(PROJECT_VERSION_MAJOR 0)
|
20
20
|
set(PROJECT_VERSION_MINOR 28)
|
21
21
|
set(PROJECT_VERSION_PATCH 0)
|
22
|
-
set(PROJECT_VERSION_GFM
|
22
|
+
set(PROJECT_VERSION_GFM 10)
|
23
23
|
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.gfm.${PROJECT_VERSION_GFM} )
|
24
24
|
|
25
25
|
option(CMARK_TESTS "Build cmark tests and enable testing" ON)
|
@@ -281,17 +281,21 @@ static cmark_node *finalize(cmark_parser *parser, cmark_node *b) {
|
|
281
281
|
|
282
282
|
switch (S_type(b)) {
|
283
283
|
case CMARK_NODE_PARAGRAPH:
|
284
|
-
|
285
|
-
|
286
|
-
|
284
|
+
{
|
285
|
+
cmark_chunk chunk = {node_content->ptr, node_content->size, 0};
|
286
|
+
while (chunk.len && chunk.data[0] == '[' &&
|
287
|
+
(pos = cmark_parse_reference_inline(parser->mem, &chunk, parser->refmap))) {
|
287
288
|
|
288
|
-
|
289
|
+
chunk.data += pos;
|
290
|
+
chunk.len -= pos;
|
289
291
|
}
|
292
|
+
cmark_strbuf_drop(node_content, (node_content->size - chunk.len));
|
290
293
|
if (is_blank(node_content, 0)) {
|
291
294
|
// remove blank node (former reference def)
|
292
295
|
cmark_node_free(b);
|
293
296
|
}
|
294
297
|
break;
|
298
|
+
}
|
295
299
|
|
296
300
|
case CMARK_NODE_CODE_BLOCK:
|
297
301
|
if (!b->as.code.fenced) { // indented code
|
@@ -70,7 +70,7 @@ static delimiter *S_insert_emph(subject *subj, delimiter *opener,
|
|
70
70
|
static int parse_inline(cmark_parser *parser, subject *subj, cmark_node *parent, int options);
|
71
71
|
|
72
72
|
static void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, subject *e,
|
73
|
-
|
73
|
+
cmark_chunk *buffer, cmark_reference_map *refmap);
|
74
74
|
static bufsize_t subject_find_special_char(subject *subj, int options);
|
75
75
|
|
76
76
|
// Create an inline with a literal string value.
|
@@ -157,12 +157,10 @@ static CMARK_INLINE cmark_node *make_autolink(subject *subj,
|
|
157
157
|
}
|
158
158
|
|
159
159
|
static void subject_from_buf(cmark_mem *mem, int line_number, int block_offset, subject *e,
|
160
|
-
|
160
|
+
cmark_chunk *chunk, cmark_reference_map *refmap) {
|
161
161
|
int i;
|
162
162
|
e->mem = mem;
|
163
|
-
e->input
|
164
|
-
e->input.len = buffer->size;
|
165
|
-
e->input.alloc = 0;
|
163
|
+
e->input = *chunk;
|
166
164
|
e->line = line_number;
|
167
165
|
e->pos = 0;
|
168
166
|
e->block_offset = block_offset;
|
@@ -1322,7 +1320,8 @@ void cmark_parse_inlines(cmark_parser *parser,
|
|
1322
1320
|
cmark_reference_map *refmap,
|
1323
1321
|
int options) {
|
1324
1322
|
subject subj;
|
1325
|
-
|
1323
|
+
cmark_chunk content = {parent->content.ptr, parent->content.size, 0};
|
1324
|
+
subject_from_buf(parser->mem, parent->start_line, parent->start_column - 1 + parent->internal_offset, &subj, &content, refmap);
|
1326
1325
|
cmark_chunk_rtrim(&subj.input);
|
1327
1326
|
|
1328
1327
|
while (!is_eof(&subj) && parse_inline(parser, &subj, parent, options))
|
@@ -1350,7 +1349,7 @@ static void spnl(subject *subj) {
|
|
1350
1349
|
// Modify refmap if a reference is encountered.
|
1351
1350
|
// Return 0 if no reference found, otherwise position of subject
|
1352
1351
|
// after reference is parsed.
|
1353
|
-
bufsize_t cmark_parse_reference_inline(cmark_mem *mem,
|
1352
|
+
bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,
|
1354
1353
|
cmark_reference_map *refmap) {
|
1355
1354
|
subject subj;
|
1356
1355
|
|
@@ -16,7 +16,7 @@ void cmark_parse_inlines(cmark_parser *parser,
|
|
16
16
|
cmark_reference_map *refmap,
|
17
17
|
int options);
|
18
18
|
|
19
|
-
bufsize_t cmark_parse_reference_inline(cmark_mem *mem,
|
19
|
+
bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_chunk *input,
|
20
20
|
cmark_reference_map *refmap);
|
21
21
|
|
22
22
|
void cmark_inlines_add_special_character(unsigned char c, bool emphasis);
|
data/lib/commonmarker/version.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.2
|
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: 2017-09-
|
12
|
+
date: 2017-09-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-enum
|