Blank lines inside html tags

Gavin's Avatar

Gavin

23 Nov, 2021 12:46 PM

Hi,

I am using MMD with a local server (Tinyweb) and Lua.vm.js to create web pages. The ability to transclude into my Lua is very helpful. e.g.

<script src="..\js\lua.vm.js"></script>
# Lua test page
<textarea class="result" rows="22" cols="50"></textarea>
<script type="text/lua">
{{LuaInit.lua}}
{{Data.lua}}
    document:querySelector('.result').textContent = t,data["g"]
</script>

This all works and I am generally very happy - but it fails if I leave a blank line within the script tags - or in the transcluded files. Is there any way to allow blank lines in the script section?

Kind Regards Gavin Holt
PS I note the same problem with this fenced code sample

  1. Support Staff 1 Posted by fletcher on 23 Nov, 2021 02:04 PM

    fletcher's Avatar

    Blank lines within HTML tags trigger Markdown/MultiMarkdown processing inside the tags. So you'll need to strip out blank lines.

    As for fenced code, that is not the case. Blank lines are allowed in fenced code blocks. Can you provide a specific example where that does not work when using MultiMarkdown? Inserting a blank line in the code snippet above works fine for me in a fenced code block.

  2. 2 Posted by Gavin on 23 Nov, 2021 07:46 PM

    Gavin's Avatar

    Hi

    Many thanks for your guidance you are of course completely correct.

    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

23 Nov, 2021 07:46 PM
10 Jun, 2021 11:53 AM
10 Jun, 2021 01:15 AM
17 Dec, 2020 03:23 PM
08 Dec, 2020 10:49 AM

Recent Articles