Skip Menu |

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

Report information
The Basics
Id: 14527
Status: resolved
Worked: 50 min
Priority: 0/
Queue: HTML-WikiConverter-MediaWiki

People
Owner: diberri [...] cpan.org
Requestors: wahit [...] mbnet.fi
Cc:
AdminCc:

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



Subject: <pre> and empty lines not supported (mediawiki)
Hi, I'm using online html2wiki converter (0.31): http://diberri.dyndns.org/html2wiki.html And I have following HTML: <pre> &lt;?php //Tämä koodi tulostaa "Terve maailma!" echo "Terve maailma!"; /* Credits and Copyright: JTS */ # Tämä on myös kommentti ?> //Tulostaa "Terve maailma!" </pre> And it produces 4 different code-areas to mediawiki. What is should do is to put those 3 empty spaces also to empty lines, but now I have to do it manually.
Show quoted text
> And it produces 4 different code-areas to mediawiki. What is should do > is to put those 3 empty spaces also to empty lines, but now I have to > do it manually.
I've narrowed down the bug to line 275 of WikiConverter.pm (inside __postprocess_output): $$outref =~ s/\n[\s^\n]+\n/\n\n/g; This substitution is needed to clean up some sloppy whitespace added during conversion. Unfortunately, it also kills the spaces used to separate lines in a continuous block of preformatted text, which is the essence of this bug. Removing this line causes many other tests to fail, so another solution is necessary for the time being. Obviously, preventing sloppy whitespace from being added in the first place would be ideal. I'll be looking into this more in the coming days. -- David Iberri
I've patched this bug in 0.31, which I plan to release today. -- David Iberri