]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Add 'notransclude' option
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Wed, 7 Jun 2017 19:44:07 +0000 (15:44 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Wed, 7 Jun 2017 19:44:07 +0000 (15:44 -0400)
Sources/multimarkdown/main.c

index 04bbc7e86fea8e0a495c75c79e3bf202cc4368b4..a77b5d6f770d41a320508b7e0315c188fb923947 100644 (file)
@@ -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;