<!DOCTYPE html> not regonsised as an HTML Tag

Hi,

I am creating a snippet with a custom HTML header i.e.

 multimarkdown.exe -s test.mmd > test.html

My test.mmd file include the following:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Expires" content="0"/>
    <link type="text/css" rel="stylesheet" href="file:///E:/MyProfile/lua/lua/html/css/Normalize.css"/>
    <link type="text/css" rel="stylesheet" href="file:///E:/MyProfile/lua/lua/html/css/MutliMarkdown2.css"/>
    <script src="file:///E:/MyProfile/lua/lua/html/js/highlight.min.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>
</head>
<body>

This was all working before I tried to use HTML5 by adding <!DOCTYPE html> this is not recognised as an html tag and the top line of my generated html contains:

<p>&lt;!DOCTYPE html&gt;

I note that the -f option generates a header including <!DOCTYPE html>, is there anyway to pass the tag into a snippet unprocessed?

Kind Regards Gavin Holt

  1. The "normal" way to do this in MultiMarkdown would be to use the -f
    option as you note, and to include your desired HTML header content as
    metadata:

    html header: <meta http-equiv="Cache-Control" content="no-cache,
    no-store, must-revalidate"/>
    ...

    foo

    Fletcher

  2. Hi,

    Many thanks for your time. My problem is of my own making, as I am piping the output of Upp into MultiMarkdown.

    To make the source files as compact as possible I an using a single Upp.exe include() function to bring in metadata and the header:

    • $(include([[\MyProfile\lua\lua\upp\inc\Head.html]]))

    As we have discussed transclusion does not work for piped input via stdin:

    I guess I will live without <!DOCTYPE html> as I cannot see any way to avoid it being modified.

    Kind Regards Gavin Holt

  3. Hi,

    Sorry I had missed the HTML head: metadata.

    Using the multimarkdown.exe -f option it all works like a charm now - please close.

    Kind Regards Gavin Holt

  4. Dear fletcherpenney.net admin, You always provide great examples and case studies.

Reply to this discussion Internal reply only staff will see it

Markdown

Attaching KB article:

» »

Read more…

Attach files

Up to 10MB each.

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

Recent Articles