Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 25418
Status: resolved
Priority: 0/
Queue: Text-MediawikiFormat

People
Owner: derek [...] ximbiot.com
Requestors: oidouque-bitcard.org [...] wincent.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.05
Fixed in: (no value)



Subject: <nowiki> fails if using as span within another block
INPUT: example <nowiki>[[hello]]</nowiki> end MEDIAWIKI: example [[hello]] end Text::MediawikiFormat: <p>example [[hello]]</p> <pre>end </pre> I previously reported this via email before I found this bugtracker. Filing it here as well. This is with Text::MediaWiki 0.05, Perl v5.8.6, Mac OS X 10.4.8. Also tested on Red Hat Enterprise Linux 3 ES (Perl v5.8.0).
From: oidouque-bitcard.org [...] wincent.com
Attaching a patch that adds some test cases for this issue (and also for bug #25417). The patch should be applied to "t/bugs.t". Output of "make test" after applying the patch: PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/absolute_links.........ok t/base...................ok t/bugs...................ok 13/18# Failed test (t/bugs.t at line 121) # got: '<pre><a href='foo'>foo</a></pre> # ' # expected: '<pre>[[foo]]</pre>' t/bugs...................NOK 16# Failed test (t/bugs.t at line 126) # got: '<pre>[1, 2, 3, <a href='4,'>5, 6</a>]</pre> # ' # expected: '<pre>[1, 2, 3, [4, 5, 6]]</pre>' t/bugs...................NOK 17# Failed test (t/bugs.t at line 131) # got: '<p>foo [[bar]]</p> # <pre>baz # </pre> # ' # expected: 'foo <nowiki>[[bar]]</nowiki> baz' t/bugs...................NOK 18# Looks like you failed 3 tests of 18. t/bugs...................dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 16-18 Failed 3/18 tests, 83.33% okay t/embedded-links.........ok t/explicit...............ok t/implicit...............ok t/kake...................ok t/lists-nested...........ok t/lists-no-indent........ok t/lists..................ok t/merge-hash.............ok t/tag-override-use-as....ok t/tag-override...........ok t/Wiki...................ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- t/bugs.t 3 768 18 3 16.67% 16-18 Failed 1/14 test scripts, 92.86% okay. 3/159 subtests failed, 98.11% okay. make: *** [test_dynamic] Error 2
8c8 < use Test::More tests => 15; --- > use Test::More tests => 18; 116a117,132 > > # http://rt.cpan.org/Public/Bug/Display.html?id=25417 > $wikitext = '<pre>[[foo]]</pre>'; > $htmltext = Text::MediawikiFormat::format ($wikitext); > is $htmltext, '<pre>[[foo]]</pre>', 'link markup should be ignored inside <pre> blocks'; > > # http://rt.cpan.org/Public/Bug/Display.html?id=25417 > $wikitext = '<pre>[1, 2, 3, [4, 5, 6]]</pre>'; > $htmltext = Text::MediawikiFormat::format ($wikitext); > is $htmltext, '<pre>[1, 2, 3, [4, 5, 6]]</pre>', 'incidental link markup should be ignored inside <pre> blocks'; > > # http://rt.cpan.org/Public/Bug/Display.html?id=25418 > $wikitext = 'foo <nowiki>[[bar]]</nowiki> baz'; > $htmltext = Text::MediawikiFormat::format ($wikitext); > is $htmltext, 'foo <nowiki>[[bar]]</nowiki> baz', 'nowiki should work inline'; >
This was a duplicate of #25417. The fix will be in the upcoming 1.0 release.