Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Incorrectly finding blockquotes embedded in fenced code blocks #38

@gerv

Description

@gerv

If you have a fenced code block with a line which begins with a "<" character, it gets incorrectly treated as a blockquote. This can be reproduced with the latest Text::Markdown from Github.

The following code demonstrates the problem (you'll need to remove the backslash from the start of the fenced code block markers before running the code):

#!/usr/bin/perl -w

use Text::Markdown 'markdown';

my $text = <<END;
\```
this is a fenced code block
> which contains a line which looks like a blockquote because it begins with greater-than
\```
END

my $html = markdown($text);

print "Text::Markdown version: " . Text::Markdown->VERSION . "\n\n";
print $html;

Remove the ">" to see the rendering as it should be.

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