Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Text-Markdown CPAN distribution.

Report information
The Basics
Id: 33552
Status: resolved
Priority: 0/
Queue: Text-Markdown

People
Owner: bobtfish [...] bobtfish.net
Requestors: rjbs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.0.12
  • 1.0.13
  • 1.0.14
Fixed in: (no value)



Subject: tab width not respected by Text::Markdown::markdown
As of at least 1.0.5, this worked: Text::Markdown::markdown($text, { tab_width => 2 }); In 1.0.14 tab_width is ignored and I have to write, instead: Text::Markdown->new(tab_width=> 2)->markdown($text); This breaks Rubric::Entry::Formatter::Markdown, at least -- rjbs
On Sun Feb 24 21:38:29 2008, RJBS wrote: Show quoted text
> As of at least 1.0.5, this worked: > > Text::Markdown::markdown($text, { tab_width => 2 }); > > In 1.0.14 tab_width is ignored and I have to write, instead: > > Text::Markdown->new(tab_width=> 2)->markdown($text); > > This breaks Rubric::Entry::Formatter::Markdown, at least
Hmm, this should work, and I can't see anything when poking around quickly in the options passing that would stop it working. This may be due to the change to the new markdown engine. Can you supply me some input which would have previously worked, but now doesn't so that I can work up a proper test case?
I've found a reasonable test case, and I think that I've found your bug. However, doing this has shown up another bug (or two!): http://svn.kulp.ch/cpan/text_multimarkdown/trunk/t/32tabwidth.t This passes 2 of the 3 tests with Text::Markdown 1.0.5, but doesn't pass any with 1.0.14 etc.. I'll get this test case fixed - so that the tab_width option works as expected when supplied to the constructor *AND* when it's passed to the markdown method... Let me know if that test case doesn't cover the issue that you're seeing however!
Bug I just found was John Gruber's, from the latest version of Markdown that he published - the tab width was hard coded in HashHTMLBlocks when he switched to using Text::Balanced to find the tags. This is now corrected the test case passes. 1.0.16 just released to CPAN which should fix your issue (and the issue mentioned above). Many thanks for the bug report! I'm going to close this ticket, please re-open if 1.0.16 doesn't work for you.