]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Add support for htmlheader and xhtmlheader metadata
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 28 Jan 2017 22:27:09 +0000 (17:27 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 28 Jan 2017 22:27:09 +0000 (17:27 -0500)
src/html.c
tests/MMD6Tests/Metadata.html
tests/MMD6Tests/Metadata.htmlc
tests/MMD6Tests/Metadata.text

index e576b855c52f32537682bc21c51d6ce7380737f7..9fb9a6fb4a53d033ad0b327e8552bab3bad6f381 100644 (file)
@@ -1018,6 +1018,8 @@ void mmd_start_complete_html(DString * out, const char * source, scratch_pad * s
                        print("\"/>\n");
                } else if (strcmp(m->key, "htmlfooter") == 0) {
                } else if (strcmp(m->key, "htmlheader") == 0) {
+                       print(m->value);
+                       print_char('\n');
                } else if (strcmp(m->key, "htmlheaderlevel") == 0) {
                } else if (strcmp(m->key, "lang") == 0) {
                } else if (strcmp(m->key, "latexfooter") == 0) {
@@ -1032,6 +1034,8 @@ void mmd_start_complete_html(DString * out, const char * source, scratch_pad * s
                        print("</title>\n");
                } else if (strcmp(m->key, "transcludebase") == 0) {
                } else if (strcmp(m->key, "xhtmlheader") == 0) {
+                       print(m->value);
+                       print_char('\n');
                } else if (strcmp(m->key, "xhtmlheaderlevel") == 0) {
                } else {
                        print("\t<meta name=\"");
index c61bbfe03444f5788264c29a314783b4e4260862..1aa81c52e93afd53cedd5373b7e0c862fa7cacb3 100644 (file)
@@ -4,6 +4,7 @@
        <meta charset="utf-8"/>
        <title>*foo* &quot;bar&quot;</title>
        <link type="text/css" rel="stylesheet" href="http://foo.com/bar.css"/>
+<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
        <meta name="foo" content="bar foo bar foo bar"/>
 </head>
 <body>
index 7519afa12e0f4d91b81cba56a84edb06135659ae..c4e621858839716f33f73b6c0394387e234febe2 100644 (file)
@@ -1,5 +1,8 @@
 <p>title:      <em>foo</em> &quot;bar&quot;
 css:   http://foo.com/bar.css
+HTML header:   <script type="text/javascript"
+       src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
 foo:   bar
 foo bar
 foo bar
index f7821fc8c865e4a8b69062b3b9550221492bf7f7..44c4bc477d61604835f93d17d228c4a6d35d0f95 100644 (file)
@@ -1,5 +1,8 @@
 title: *foo* "bar"
 css:   http://foo.com/bar.css
+HTML header:   <script type="text/javascript"
+       src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+       </script>
 foo:   bar
 foo bar
        foo bar