recent errors to remember - alt text in fences

Apparently Pandoc is picky about what would otherwise be the alt text for a code block. My measuring stick has become to call Pandoc with a destination of -t markdown_strict so that it will show me the markdown it thinks it just parsed. I’m occasionally surprised by the results.

For example, this is entirely valid:

echo foo

This will produce the following in pandoc -t markdown_strict:

    echo foo

Now here’s what it does with some of my (not fixed) notes…

#!/bin/bash

##

# This script does blah blah blah

. settings.sh

# more content...

And that will get butchered like this:

bash file: touch.sh #!/bin/bash ## # This script does blah blah blah . settings.sh # more content...

Instead of a fence, it’s apparently an empty inline code segment followed by some more inline code, and since it’s not a fence, it will condense the whitespaces.

My intention was to create a fence, indicate that it was bash syntax, and put the name in a convenient location. That didn’t work out so well.

This is also fine:

!/bin/bash

More comments...

fun(){

local FOO=${1}

echo "${#FOO}"

}

It will correctly become this:

    #!/bin/bash
    ##
    # More comments...
    fun(){
        local FOO=${1}
        echo "${#FOO}"
    }

And this is not fine.

!/bin/bash

More comments...

fun(){

local FOO=${1}

echo "${#FOO}"

}

It will similarly become:

To summarize, these are all valid fence beginnings:

And these are not valid because of the additional words:

Proxy Information
Original URL
gemini://thatit.be/2023-04-20-22-36-13.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
434.635286 milliseconds
Gemini-to-HTML Time
0.928725 milliseconds

This content has been proxied by September (ba2dc).