<!DOCTYPE html> not regonsised as an HTML Tag

Gavin's Avatar

Gavin

09 Jan, 2022 09:29 PM

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. Support Staff 1 Posted by fletcher on 10 Jan, 2022 01:20 AM

    fletcher's Avatar

    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. 2 Posted by Gavin on 10 Jan, 2022 07:10 PM

    Gavin's Avatar

    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. 3 Posted by Gavin on 11 Jan, 2022 02:33 PM

    Gavin's Avatar

    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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

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

11 Dec, 2022 09:57 PM
11 Dec, 2022 07:57 PM
26 Sep, 2022 02:40 AM
21 Jul, 2022 10:22 AM
11 Jan, 2022 02:33 PM

Recent Articles