Blank lines inside html tags
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
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
Support Staff 1 Posted by fletcher on 23 Nov, 2021 02:04 PM
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 Posted by Gavin on 23 Nov, 2021 03:26 PM
Hi
Many thanks for the clarification. I will strip/replace blank lines in my scripts/includes.
I was simply wrong about fenced code as you say it will tolerate blank lines.
Really enjoying playing with MMD as the CGI application for TinyWeb. I know MMD is not designed for this task, but it works very neatly and with transclusion it is very efficient.
Kind Regards Gavin Holt
3 Posted by Gavin on 23 Nov, 2021 07:46 PM
Hi
Many thanks for your guidance you are of course completely correct.
Kind Regards Gavin Holt
Support Staff 4 Posted by fletcher on 11 Dec, 2022 07:57 PM
Sorry for the delay -- your response was sent to the spam filter... :(
There's not really a concept of 404 for MultiMarkdown. That would need
to be handled outside of MMD.
Fletcher