Skip to content

[Markdown] having a space in a markdown image link will fail to generate its HTML #3840

@Lenormju

Description

@Lenormju

I use mkslides to generate Reveal.js slides from Markdown.
I stumbled upon a bug using it, that I am indicated should be solved here (upstream) : MartenBE/mkslides#65

I tried to use a Reveal.js starter to reproduce the bug, but it does not allow to create other files.

I wanted to do a proper installation locally to create a minimal reproducible example, but I could not follow the Recommended Full Setup instructions.

And I could not find your bug template (is there any ?).

So I am sorry if this issue does not include all that is required for reproducing it.

Using reveal.js, version 5.1.0 (bundled by mkslides), I have this problem :

given this Markdown file :

# Bug ?
![](banana.png)
![](more banana.png)

Then the HTML content that is included in the slides index.html contains the tags for the first image, but not the second, which is treated as text (even if the file exists).

<section data-markdown="" data-markdown-parsed="true" style="top: 95px; display: block;" class="present">
    <h1 id="bug-">Bug ?</h1>
    <p>
        <img alt="" src="banana.png">
        ![](more banana.png)
    </p>
</section>

What do you think ?

I understand that URLs should not contain space characters (which are, in this URI context, invalid characters and should have been URI-encoded as %20).
But it looks to me that this failuure could be handled in a better way. Do you agree ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions