From: Fletcher T. Penney Date: Wed, 7 Jun 2017 19:44:07 +0000 (-0400) Subject: ADDED: Add 'notransclude' option X-Git-Tag: 6.1.0^2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e9e5c8cc0273883a572d4444097265398635c93;p=multimarkdown ADDED: Add 'notransclude' option --- diff --git a/Sources/multimarkdown/main.c b/Sources/multimarkdown/main.c index 04bbc7e..a77b5d6 100644 --- a/Sources/multimarkdown/main.c +++ b/Sources/multimarkdown/main.c @@ -72,7 +72,8 @@ // argtable structs struct arg_lit *a_help, *a_version, *a_compatibility, *a_nolabels, *a_batch, - *a_accept, *a_reject, *a_full, *a_snippet, *a_random, *a_meta; + *a_accept, *a_reject, *a_full, *a_snippet, *a_random, *a_meta, + *a_notransclude; struct arg_str *a_format, *a_lang, *a_extract; struct arg_file *a_file, *a_o; struct arg_end *a_end; @@ -147,6 +148,7 @@ int main(int argc, char** argv) { a_compatibility = arg_lit0("c", "compatibility", "Markdown compatibility mode"), a_random = arg_lit0(NULL, "random", "use random numbers for footnote anchors"), a_nolabels = arg_lit0(NULL, "nolabels", "Disable id attributes for headers"), + a_notransclude = arg_lit0(NULL, "notransclude", "Disable file transclusion"), a_rem2 = arg_rem("", ""), @@ -222,6 +224,11 @@ int main(int argc, char** argv) { extensions |= EXT_NO_LABELS; } + if (a_notransclude->count > 0) { + // Disable file transclusion + extensions &= ~EXT_TRANSCLUDE; + } + if (a_accept->count > 0) { // Accept CriticMarkup changes extensions |= EXT_CRITIC_ACCEPT | EXT_CRITIC;