rmultimarkdown 6.2.2.1 → 6.4.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 +4 -4
- data/ext/Makefile +2 -2
- data/ext/mmd/aho-corasick.c +12 -8
- data/ext/mmd/beamer.c +29 -0
- data/ext/mmd/critic_markup.c +100 -4
- data/ext/mmd/critic_markup.h +7 -0
- data/ext/mmd/d_string.c +502 -119
- data/ext/mmd/epub.c +2 -4
- data/ext/mmd/file.c +436 -0
- data/ext/mmd/file.h +153 -0
- data/ext/mmd/html.c +130 -37
- data/ext/mmd/include/d_string.h +20 -19
- data/ext/mmd/include/libMultiMarkdown.h +42 -27
- data/ext/mmd/include/token.h +15 -15
- data/ext/mmd/latex.c +107 -30
- data/ext/mmd/lexer.c +19 -7
- data/ext/mmd/lexer.h +2 -2
- data/ext/mmd/memoir.c +29 -0
- data/ext/mmd/mmd.c +65 -39
- data/ext/mmd/object_pool.h +4 -4
- data/ext/mmd/opendocument-content.c +95 -13
- data/ext/mmd/opendocument.c +315 -313
- data/ext/mmd/opml-lexer.c +2183 -0
- data/ext/mmd/opml-lexer.h +157 -0
- data/ext/mmd/opml-parser.c +1193 -0
- data/ext/mmd/opml-parser.h +15 -0
- data/ext/mmd/opml-reader.c +435 -0
- data/ext/mmd/opml-reader.h +111 -0
- data/ext/mmd/opml.c +511 -0
- data/ext/mmd/opml.h +115 -0
- data/ext/mmd/parser.c +2 -0
- data/ext/mmd/rng.c +1 -1
- data/ext/mmd/scanners.c +51663 -24824
- data/ext/mmd/stack.c +4 -2
- data/ext/mmd/stack.h +8 -8
- data/ext/mmd/textbundle.c +2 -4
- data/ext/mmd/token.c +24 -12
- data/ext/mmd/token_pairs.c +2 -2
- data/ext/mmd/token_pairs.h +10 -10
- data/ext/mmd/transclude.c +1 -226
- data/ext/mmd/transclude.h +0 -8
- data/ext/mmd/uuid.c +3 -3
- data/ext/mmd/version.h +3 -3
- data/ext/mmd/writer.c +99 -30
- data/ext/mmd/writer.h +11 -0
- data/lib/multi_markdown.bundle +0 -0
- data/lib/multi_markdown/version.rb +1 -1
- metadata +13 -5
- data/ext/mmd/fodt.c +0 -2288
- data/ext/mmd/fodt.h +0 -81
data/ext/mmd/transclude.h
CHANGED
@@ -63,14 +63,6 @@
|
|
63
63
|
#endif
|
64
64
|
|
65
65
|
|
66
|
-
/// Combine directory and base filename to create a full path */
|
67
|
-
char * path_from_dir_base(const char * dir, const char * base);
|
68
|
-
|
69
|
-
|
70
|
-
// Read file into memory
|
71
|
-
DString * scan_file(const char * fname);
|
72
|
-
|
73
|
-
|
74
66
|
/// Recursively transclude source text, given a search directory.
|
75
67
|
/// Track files to prevent infinite recursive loops
|
76
68
|
void mmd_transclude_source(DString * source, const char * search_path, const char * source_path, short format, stack * parsed, stack * manifest);
|
data/ext/mmd/uuid.c
CHANGED
@@ -102,8 +102,8 @@ char * uuid_string_from_bits(unsigned char * raw) {
|
|
102
102
|
char * result = malloc(37);
|
103
103
|
|
104
104
|
sprintf(result, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
105
|
-
|
106
|
-
|
105
|
+
raw[0], raw[1], raw[2], raw[3], raw[4], raw[5], raw[6], raw[7],
|
106
|
+
raw[8], raw[9], raw[10], raw[11], raw[12], raw[13], raw[14], raw[15] );
|
107
107
|
|
108
108
|
return result;
|
109
109
|
}
|
@@ -149,6 +149,6 @@ void custom_seed_rand(void) {
|
|
149
149
|
// This is not a "cryptographically secure" random seed,
|
150
150
|
// but good enough for an EPUB id....
|
151
151
|
unsigned long seed = mix(clock(), time(NULL), clock());
|
152
|
-
srand(seed);
|
152
|
+
srand((unsigned int)seed);
|
153
153
|
}
|
154
154
|
|
data/ext/mmd/version.h
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
version.h -- MultiMarkdown
|
4
4
|
|
5
|
-
Copyright © 2016 -
|
5
|
+
Copyright © 2016 - 2018 Fletcher T. Penney.
|
6
6
|
|
7
7
|
|
8
8
|
|
@@ -23,8 +23,8 @@
|
|
23
23
|
|
24
24
|
#define MULTIMARKDOWN_NAME "MultiMarkdown"
|
25
25
|
|
26
|
-
#define MULTIMARKDOWN_VERSION "6.
|
27
|
-
#define MULTIMARKDOWN_COPYRIGHT "Copyright © 2016 -
|
26
|
+
#define MULTIMARKDOWN_VERSION "6.4.0"
|
27
|
+
#define MULTIMARKDOWN_COPYRIGHT "Copyright © 2016 - 2018 Fletcher T. Penney."
|
28
28
|
|
29
29
|
#define MULTIMARKDOWN_LICENSE "\tThe `MultiMarkdown 6` project is released under the MIT License..\n"\
|
30
30
|
" \n"\
|
data/ext/mmd/writer.c
CHANGED
@@ -69,6 +69,7 @@
|
|
69
69
|
#include "memoir.h"
|
70
70
|
#include "mmd.h"
|
71
71
|
#include "opendocument-content.h"
|
72
|
+
#include "opml.h"
|
72
73
|
#include "parser.h"
|
73
74
|
#include "scanners.h"
|
74
75
|
#include "token.h"
|
@@ -153,6 +154,7 @@ scratch_pad * scratch_pad_new(mmd_engine * e, short format) {
|
|
153
154
|
p->header_stack = e->header_stack;
|
154
155
|
|
155
156
|
p->outline_stack = stack_new(0);
|
157
|
+
p->opml_item_closed = 1;
|
156
158
|
|
157
159
|
p->recurse_depth = 0;
|
158
160
|
|
@@ -418,8 +420,8 @@ char * label_from_string(const char * str) {
|
|
418
420
|
next_char++;
|
419
421
|
}
|
420
422
|
} else if ((*str >= '0' && *str <= '9') || (*str >= 'A' && *str <= 'Z')
|
421
|
-
|
422
|
-
|
423
|
+
|| (*str >= 'a' && *str <= 'z') || (*str == '.') || (*str == '_')
|
424
|
+
|| (*str == '-') || (*str == ':')) {
|
423
425
|
// Allow 0-9, A-Z, a-z, ., _, -, :
|
424
426
|
d_string_append_c(out, tolower(*str));
|
425
427
|
}
|
@@ -475,6 +477,22 @@ char * clean_string(const char * str, bool lowercase) {
|
|
475
477
|
|
476
478
|
while (*str != '\0') {
|
477
479
|
switch (*str) {
|
480
|
+
case '\\':
|
481
|
+
switch (*(str + 1)) {
|
482
|
+
case '\n':
|
483
|
+
case '\r':
|
484
|
+
d_string_append_c(out, '\n');
|
485
|
+
block_whitespace = true;
|
486
|
+
break;
|
487
|
+
|
488
|
+
default:
|
489
|
+
d_string_append_c(out, '\\');
|
490
|
+
block_whitespace = false;
|
491
|
+
break;
|
492
|
+
}
|
493
|
+
|
494
|
+
break;
|
495
|
+
|
478
496
|
case '\t':
|
479
497
|
case ' ':
|
480
498
|
case '\n':
|
@@ -598,8 +616,10 @@ attr * parse_attributes(char * source) {
|
|
598
616
|
a->next = attr_new(key, value);
|
599
617
|
a = a->next;
|
600
618
|
} else {
|
619
|
+
#ifndef __clang_analyzer__
|
601
620
|
a = attr_new(key, value);
|
602
621
|
attributes = a;
|
622
|
+
#endif
|
603
623
|
}
|
604
624
|
|
605
625
|
free(value); // We stored a modified copy
|
@@ -609,7 +629,7 @@ attr * parse_attributes(char * source) {
|
|
609
629
|
}
|
610
630
|
|
611
631
|
|
612
|
-
link * link_new(const char * source, token * label, char * url, char * title, char * attributes) {
|
632
|
+
link * link_new(const char * source, token * label, char * url, char * title, char * attributes, short flags) {
|
613
633
|
link * l = malloc(sizeof(link));
|
614
634
|
|
615
635
|
if (l) {
|
@@ -626,6 +646,8 @@ link * link_new(const char * source, token * label, char * url, char * title, ch
|
|
626
646
|
l->url = clean_string(url, false);
|
627
647
|
l->title = (title == NULL) ? NULL : my_strdup(title);
|
628
648
|
l->attributes = (attributes == NULL) ? NULL : parse_attributes(attributes);
|
649
|
+
|
650
|
+
l->flags = flags;
|
629
651
|
}
|
630
652
|
|
631
653
|
return l;
|
@@ -909,7 +931,7 @@ char * destination_accept(const char * source, token ** remainder, bool validate
|
|
909
931
|
|
910
932
|
// Advance remainder to end of destination
|
911
933
|
while ((*remainder)->next &&
|
912
|
-
|
934
|
+
(*remainder)->next->start < start + scan_len) {
|
913
935
|
*remainder = (*remainder)->next;
|
914
936
|
}
|
915
937
|
|
@@ -962,7 +984,7 @@ char * url_accept(const char * source, size_t start, size_t max_len, size_t * en
|
|
962
984
|
|
963
985
|
// Is this <foo>?
|
964
986
|
if ((source[start] == '<') &&
|
965
|
-
|
987
|
+
(source[start + scan_len - 1] == '>')) {
|
966
988
|
// Strip '<' and '>'
|
967
989
|
start++;
|
968
990
|
scan_len -= 2;
|
@@ -1027,7 +1049,7 @@ void extract_from_paren(token * paren, const char * source, char ** url, char **
|
|
1027
1049
|
}
|
1028
1050
|
|
1029
1051
|
|
1030
|
-
/// Create a link from an explicit link `[foo](bar)`
|
1052
|
+
/// Create a link from an explicit "inline" link `[foo](bar)`
|
1031
1053
|
link * explicit_link(scratch_pad * scratch, token * bracket, token * paren, const char * source) {
|
1032
1054
|
char * url_char = NULL;
|
1033
1055
|
char * title_char = NULL;
|
@@ -1038,10 +1060,10 @@ link * explicit_link(scratch_pad * scratch, token * bracket, token * paren, cons
|
|
1038
1060
|
|
1039
1061
|
if (attr_char) {
|
1040
1062
|
if (!(scratch->extensions & EXT_COMPATIBILITY)) {
|
1041
|
-
l = link_new(source, NULL, url_char, title_char, attr_char);
|
1063
|
+
l = link_new(source, NULL, url_char, title_char, attr_char, LINK_INLINE);
|
1042
1064
|
}
|
1043
1065
|
} else {
|
1044
|
-
l = link_new(source, NULL, url_char, title_char, attr_char);
|
1066
|
+
l = link_new(source, NULL, url_char, title_char, attr_char, LINK_INLINE);
|
1045
1067
|
}
|
1046
1068
|
|
1047
1069
|
free(url_char);
|
@@ -1054,6 +1076,7 @@ link * explicit_link(scratch_pad * scratch, token * bracket, token * paren, cons
|
|
1054
1076
|
|
1055
1077
|
footnote * footnote_new(const char * source, token * label, token * content, bool lowercase) {
|
1056
1078
|
footnote * f = malloc(sizeof(footnote));
|
1079
|
+
token * walker;
|
1057
1080
|
|
1058
1081
|
if (f) {
|
1059
1082
|
f->label = label;
|
@@ -1072,6 +1095,25 @@ footnote * footnote_new(const char * source, token * label, token * content, boo
|
|
1072
1095
|
token_trim_leading_whitespace(content, source);
|
1073
1096
|
|
1074
1097
|
default:
|
1098
|
+
// Trim trailing newlines
|
1099
|
+
walker = content->tail;
|
1100
|
+
|
1101
|
+
while (walker) {
|
1102
|
+
switch (walker->type) {
|
1103
|
+
case TEXT_NL:
|
1104
|
+
case TEXT_NL_SP:
|
1105
|
+
content->tail = walker->prev;
|
1106
|
+
token_free(walker);
|
1107
|
+
walker = content->tail;
|
1108
|
+
walker->next = NULL;
|
1109
|
+
break;
|
1110
|
+
|
1111
|
+
default:
|
1112
|
+
walker = NULL;
|
1113
|
+
break;
|
1114
|
+
}
|
1115
|
+
}
|
1116
|
+
|
1075
1117
|
f->content = token_new_parent(content, BLOCK_PARA);
|
1076
1118
|
f->free_para = true;
|
1077
1119
|
break;
|
@@ -1294,12 +1336,12 @@ bool definition_extract(mmd_engine * e, token ** remainder) {
|
|
1294
1336
|
}
|
1295
1337
|
}
|
1296
1338
|
|
1297
|
-
l = link_new(e->dstr->str, label, url_char, title_char, attr_char);
|
1339
|
+
l = link_new(e->dstr->str, label, url_char, title_char, attr_char, LINK_REFERENCE);
|
1298
1340
|
} else {
|
1299
1341
|
// Not valid match
|
1300
1342
|
}
|
1301
1343
|
} else {
|
1302
|
-
l = link_new(e->dstr->str, label, url_char, title_char, attr_char);
|
1344
|
+
l = link_new(e->dstr->str, label, url_char, title_char, attr_char, LINK_REFERENCE);
|
1303
1345
|
}
|
1304
1346
|
|
1305
1347
|
// Store link for later use
|
@@ -1363,12 +1405,14 @@ void process_definition_block(mmd_engine * e, token * block) {
|
|
1363
1405
|
}
|
1364
1406
|
|
1365
1407
|
// Adjust the properties
|
1366
|
-
|
1367
|
-
|
1408
|
+
if (f) {
|
1409
|
+
free(f->label_text);
|
1410
|
+
f->label_text = f->clean_text;
|
1411
|
+
}
|
1368
1412
|
|
1369
1413
|
if (f->content->child &&
|
1370
|
-
|
1371
|
-
|
1414
|
+
f->content->child->next &&
|
1415
|
+
f->content->child->next->next) {
|
1372
1416
|
f->clean_text = clean_string_from_range(e->dstr->str, f->content->child->next->next->start, block->start + block->len - f->content->child->next->next->start, false);
|
1373
1417
|
} else {
|
1374
1418
|
f->clean_text = NULL;
|
@@ -1514,7 +1558,7 @@ void process_header_to_links(mmd_engine * e, token * h) {
|
|
1514
1558
|
|
1515
1559
|
d_string_append(url, label);
|
1516
1560
|
|
1517
|
-
link * l = link_new(e->dstr->str, h, url->str, NULL, NULL);
|
1561
|
+
link * l = link_new(e->dstr->str, h, url->str, NULL, NULL, LINK_AUTO);
|
1518
1562
|
|
1519
1563
|
// Store link for later use
|
1520
1564
|
stack_push(e->link_stack, l);
|
@@ -1542,7 +1586,7 @@ void process_table_to_link(mmd_engine * e, token * t) {
|
|
1542
1586
|
token * temp_token = t->next->child;
|
1543
1587
|
|
1544
1588
|
if (temp_token->next &&
|
1545
|
-
|
1589
|
+
temp_token->next->type == PAIR_BRACKET) {
|
1546
1590
|
temp_token = temp_token->next;
|
1547
1591
|
}
|
1548
1592
|
|
@@ -1551,7 +1595,7 @@ void process_table_to_link(mmd_engine * e, token * t) {
|
|
1551
1595
|
DString * url = d_string_new("#");
|
1552
1596
|
d_string_append(url, label);
|
1553
1597
|
|
1554
|
-
link * l = link_new(e->dstr->str, temp_token, url->str, NULL, NULL);
|
1598
|
+
link * l = link_new(e->dstr->str, temp_token, url->str, NULL, NULL, LINK_AUTO);
|
1555
1599
|
|
1556
1600
|
stack_push(e->link_stack, l);
|
1557
1601
|
|
@@ -1571,7 +1615,7 @@ void process_table_stack(mmd_engine * e) {
|
|
1571
1615
|
/// Parse metadata
|
1572
1616
|
void process_metadata_stack(mmd_engine * e, scratch_pad * scratch) {
|
1573
1617
|
if ((scratch->extensions & EXT_NO_METADATA) ||
|
1574
|
-
|
1618
|
+
(scratch->extensions & EXT_COMPATIBILITY)) {
|
1575
1619
|
return;
|
1576
1620
|
}
|
1577
1621
|
|
@@ -1601,13 +1645,13 @@ void process_metadata_stack(mmd_engine * e, scratch_pad * scratch) {
|
|
1601
1645
|
}
|
1602
1646
|
} else if (strcmp(m->key, "latexheaderlevel") == 0) {
|
1603
1647
|
if ((scratch->output_format == FORMAT_LATEX) ||
|
1604
|
-
|
1605
|
-
|
1648
|
+
(scratch->output_format == FORMAT_BEAMER) ||
|
1649
|
+
(scratch->output_format == FORMAT_MEMOIR)) {
|
1606
1650
|
header_level = atoi(m->value);
|
1607
1651
|
}
|
1608
1652
|
} else if (strcmp(m->key, "odfheaderlevel") == 0) {
|
1609
1653
|
if ((scratch->output_format == FORMAT_ODT) ||
|
1610
|
-
|
1654
|
+
(scratch->output_format == FORMAT_FODT)) {
|
1611
1655
|
header_level = atoi(m->value);
|
1612
1656
|
}
|
1613
1657
|
} else if (strcmp(m->key, "language") == 0) {
|
@@ -1618,7 +1662,7 @@ void process_metadata_stack(mmd_engine * e, scratch_pad * scratch) {
|
|
1618
1662
|
scratch->quotes_lang = GERMAN;
|
1619
1663
|
} else if (strcmp(temp_char, "es") == 0) {
|
1620
1664
|
scratch->language = LC_ES;
|
1621
|
-
scratch->quotes_lang =
|
1665
|
+
scratch->quotes_lang = SPANISH;
|
1622
1666
|
} else if (strcmp(temp_char, "fr") == 0) {
|
1623
1667
|
scratch->language = LC_FR;
|
1624
1668
|
scratch->quotes_lang = FRENCH;
|
@@ -1650,18 +1694,21 @@ void process_metadata_stack(mmd_engine * e, scratch_pad * scratch) {
|
|
1650
1694
|
temp_char = label_from_string(m->value);
|
1651
1695
|
|
1652
1696
|
if ((strcmp(temp_char, "dutch") == 0) ||
|
1653
|
-
|
1697
|
+
(strcmp(temp_char, "nl") == 0)) {
|
1654
1698
|
scratch->quotes_lang = DUTCH;
|
1655
1699
|
} else if ((strcmp(temp_char, "french") == 0) ||
|
1656
|
-
|
1700
|
+
(strcmp(temp_char, "fr") == 0)) {
|
1657
1701
|
scratch->quotes_lang = FRENCH;
|
1658
1702
|
} else if ((strcmp(temp_char, "german") == 0) ||
|
1659
|
-
|
1703
|
+
(strcmp(temp_char, "de") == 0)) {
|
1660
1704
|
scratch->quotes_lang = GERMAN;
|
1661
1705
|
} else if (strcmp(temp_char, "germanguillemets") == 0) {
|
1662
1706
|
scratch->quotes_lang = GERMANGUILL;
|
1707
|
+
} else if ((strcmp(temp_char, "spanish") == 0) ||
|
1708
|
+
(strcmp(temp_char, "es") == 0)) {
|
1709
|
+
scratch->quotes_lang = SPANISH;
|
1663
1710
|
} else if ((strcmp(temp_char, "swedish") == 0) ||
|
1664
|
-
|
1711
|
+
(strcmp(temp_char, "sv") == 0)) {
|
1665
1712
|
scratch->quotes_lang = SWEDISH;
|
1666
1713
|
} else {
|
1667
1714
|
scratch->quotes_lang = ENGLISH;
|
@@ -1767,7 +1814,7 @@ void automatic_search(mmd_engine * e, token * t, trie * ac) {
|
|
1767
1814
|
|
1768
1815
|
void identify_global_search_terms(mmd_engine * e, scratch_pad * scratch) {
|
1769
1816
|
// Only search if we have a target
|
1770
|
-
|
1817
|
+
size_t count = e->abbreviation_stack->size + e->glossary_stack->size;
|
1771
1818
|
|
1772
1819
|
if (count == 0) {
|
1773
1820
|
return;
|
@@ -1825,6 +1872,7 @@ void mmd_engine_export_token_tree(DString * out, mmd_engine * e, short format) {
|
|
1825
1872
|
|
1826
1873
|
mmd_export_token_tree_beamer(out, e->dstr->str, e->root, scratch);
|
1827
1874
|
|
1875
|
+
// Close out any existing outline levels
|
1828
1876
|
mmd_outline_add_beamer(out, NULL, scratch);
|
1829
1877
|
|
1830
1878
|
mmd_export_citation_list_beamer(out, e->dstr->str, scratch);
|
@@ -1905,6 +1953,10 @@ void mmd_engine_export_token_tree(DString * out, mmd_engine * e, short format) {
|
|
1905
1953
|
|
1906
1954
|
// mmd_end_complete_odf(out, e->dstr->str, scratch);
|
1907
1955
|
break;
|
1956
|
+
|
1957
|
+
case FORMAT_OPML:
|
1958
|
+
mmd_export_token_tree_opml(out, e->dstr->str, e->root, scratch);
|
1959
|
+
break;
|
1908
1960
|
}
|
1909
1961
|
|
1910
1962
|
// Preserve asset_hash for possible use in export
|
@@ -2459,6 +2511,18 @@ void strip_leading_whitespace(token * chain, const char * source) {
|
|
2459
2511
|
}
|
2460
2512
|
|
2461
2513
|
|
2514
|
+
void trim_trailing_whitespace_d_string(DString * d) {
|
2515
|
+
if (d) {
|
2516
|
+
char * c = &(d->str[d->currentStringLength - 1]);
|
2517
|
+
|
2518
|
+
while (d->currentStringLength && char_is_whitespace(*c)) {
|
2519
|
+
*c-- = 0;
|
2520
|
+
d->currentStringLength--;
|
2521
|
+
}
|
2522
|
+
}
|
2523
|
+
}
|
2524
|
+
|
2525
|
+
|
2462
2526
|
bool table_has_caption(token * t) {
|
2463
2527
|
|
2464
2528
|
if (t->next && t->next->type == BLOCK_PARA) {
|
@@ -2468,13 +2532,18 @@ bool table_has_caption(token * t) {
|
|
2468
2532
|
t = t->next;
|
2469
2533
|
|
2470
2534
|
if (t && t->next &&
|
2471
|
-
|
2535
|
+
t->next->type == PAIR_BRACKET) {
|
2472
2536
|
t = t->next;
|
2473
2537
|
}
|
2474
2538
|
|
2539
|
+
if (t == NULL) {
|
2540
|
+
// End of file
|
2541
|
+
return true;
|
2542
|
+
}
|
2543
|
+
|
2475
2544
|
if (t && t->next &&
|
2476
|
-
|
2477
|
-
|
2545
|
+
((t->next->type == TEXT_NL) ||
|
2546
|
+
(t->next->type == TEXT_LINEBREAK))) {
|
2478
2547
|
t = t->next;
|
2479
2548
|
}
|
2480
2549
|
|
data/ext/mmd/writer.h
CHANGED
@@ -113,6 +113,7 @@ typedef struct {
|
|
113
113
|
stack * header_stack;
|
114
114
|
|
115
115
|
stack * outline_stack;
|
116
|
+
short opml_item_closed;
|
116
117
|
|
117
118
|
short recurse_depth;
|
118
119
|
|
@@ -144,9 +145,17 @@ struct link {
|
|
144
145
|
char * url;
|
145
146
|
char * title;
|
146
147
|
attr * attributes;
|
148
|
+
short flags;
|
147
149
|
UT_hash_handle hh;
|
148
150
|
};
|
149
151
|
|
152
|
+
enum link_flags {
|
153
|
+
LINK_INLINE = 1 << 0, //!< Inline link, e.g. [foo](#bar)
|
154
|
+
LINK_IMPLICIT = 1 << 1, //!< Implicit link, e.g. [foo]
|
155
|
+
LINK_REFERENCE = 1 << 2, //!< Reference definition
|
156
|
+
LINK_AUTO = 1 << 3, //!< Automatically generated link (e.g. Headers, tables)
|
157
|
+
};
|
158
|
+
|
150
159
|
typedef struct link link;
|
151
160
|
|
152
161
|
struct footnote {
|
@@ -236,6 +245,8 @@ void read_table_column_alignments(const char * source, token * table, scratch_pa
|
|
236
245
|
|
237
246
|
void strip_leading_whitespace(token * chain, const char * source);
|
238
247
|
|
248
|
+
void trim_trailing_whitespace_d_string(DString * d);
|
249
|
+
|
239
250
|
bool table_has_caption(token * table);
|
240
251
|
|
241
252
|
char * get_fence_language_specifier(token * fence, const char * source);
|
data/lib/multi_markdown.bundle
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmultimarkdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Till Schulte-Coerne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,8 +54,8 @@ files:
|
|
54
54
|
- ext/mmd/d_string.c
|
55
55
|
- ext/mmd/epub.c
|
56
56
|
- ext/mmd/epub.h
|
57
|
-
- ext/mmd/
|
58
|
-
- ext/mmd/
|
57
|
+
- ext/mmd/file.c
|
58
|
+
- ext/mmd/file.h
|
59
59
|
- ext/mmd/html.c
|
60
60
|
- ext/mmd/html.h
|
61
61
|
- ext/mmd/i18n.h
|
@@ -78,6 +78,14 @@ files:
|
|
78
78
|
- ext/mmd/opendocument-content.h
|
79
79
|
- ext/mmd/opendocument.c
|
80
80
|
- ext/mmd/opendocument.h
|
81
|
+
- ext/mmd/opml-lexer.c
|
82
|
+
- ext/mmd/opml-lexer.h
|
83
|
+
- ext/mmd/opml-parser.c
|
84
|
+
- ext/mmd/opml-parser.h
|
85
|
+
- ext/mmd/opml-reader.c
|
86
|
+
- ext/mmd/opml-reader.h
|
87
|
+
- ext/mmd/opml.c
|
88
|
+
- ext/mmd/opml.h
|
81
89
|
- ext/mmd/parser.c
|
82
90
|
- ext/mmd/parser.h
|
83
91
|
- ext/mmd/rng.c
|
@@ -132,5 +140,5 @@ signing_key:
|
|
132
140
|
specification_version: 4
|
133
141
|
summary: A MultiMarkdown 6 binding for Ruby
|
134
142
|
test_files:
|
135
|
-
- test/extensions_test.rb
|
136
143
|
- test/multi_markdown_test.rb
|
144
|
+
- test/extensions_test.rb
|