Skip to content

Infinite loop when beginning a paragraph with a HTML tag within a markdown="1" tag #430

@rwmpelstilzchen

Description

@rwmpelstilzchen

Hi,

Thanks for Python-Markdown; it is very useful to me ☺

When running markdown_py -x markdown.extensions.extra foo.md on this input:

This is *true* markdown text.

<div markdown="1">
This is *true* markdown text.

This is <em>true</em> HTML text.
</div>

I get this OK HTML output:

<p>This is <em>true</em> markdown text.</p>
<div>
<p>This is <em>true</em> markdown text.</p>
<p>This is <em>true</em> HTML text.</p>
</div>

But when I try to run the same command on this input:

This is *true* markdown text.

<div markdown="1">
This is *true* markdown text.

<em>True</em> HTML text.
</div>

I get no output and markdown_py is stuck in an infinite loop.

This happens with my up-to-date python-markdown installation on my Arch Linux (version 2.6.2-1 in pacman) as well as with a fresh clone of the git repository.

I’m quite sure this is a genuine bug, but maybe there is something wrong with my local system.

Thanks!
Júda

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions