Skip Menu |

This queue is for tickets about the HTML-Formatter CPAN distribution.

Report information
The Basics
Id: 111783
Status: resolved
Priority: 0/
Queue: HTML-Formatter

People
Owner: Nobody in particular
Requestors: wlindley [...] wlindley.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.15-TRIAL



Subject: Two Little Bugs in HTML::FormatMarkdown
Date: Thu, 4 Feb 2016 13:23:19 -0600
To: bug-HTML-Formatter [...] rt.cpan.org
From: William Lindley <wlindley [...] wlindley.com>
Hello, two bugs to report: 1. In version 2.14 of HTML::FormatMarkdown, the following fails: HTML::FormatMarkdown->format_string('<a href="foo">foo</a>') returns only: [ instead of the expected tag. This is because no text has been emitted yet; thus, subroutine "out" returns 0 (line 261): |||$self||->{||'out'||}++;| because $self->{'out'} is zero; thus a_start (which successfully emitted the '[' to open the Markdown anchor) returns failure, and rest of the anchor tag is discarded. To correct this, probably modify the out subroutine to end with: |||else| |{| |||$self||->out(||"["||); 1; | |||}| 2. If no alt tag is specified in an <img>, for example HTML::FormatMarkdown->format_string('<img src="foo.jpg">foo') a warning is issued: Use of uninitialized value $alt in concatenation (.) or string at [...] /HTML/FormatMarkdown.pm line 99 the resulting output ( ![][foo.jpg]foo ) is correct, but the warning is unsightly and should be avoided. Thank you for considering this report, \\/ William Lindley Glenview, IL 480-947-6100
HI, Thanks for the report. This is fixed in version 2.16 - the commit was 0529fff05e407ff413f38cc45cebc72282ec3c18 https://github.com/nigelm/html-formatter/commit/0529fff05e407ff413f38cc45cebc72282ec3c18 Nigel.