#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 8; use MarkdownParser; my $parser = MarkdownParser->new(); is( $parser->parse("[link text](http://example.com)"), "
\n", "Simple link" ); is( $parser->parse("[link with spaces](https://example.com/path)"), "\n", "Link with path" ); is( $parser->parse(""), "

Click me
\n", "JavaScript protocol blocked in links" ); is( $parser->parse("[Click me](data:text/html,)"), "Click me
\n", "Data protocol blocked in links" ); is( $parser->parse(")"), "Image
\n", "JavaScript protocol blocked in images" ); is( $parser->parse(""), "Image
\n", "File protocol blocked in images" );