Skip Menu |

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

Report information
The Basics
Id: 12394
Status: resolved
Worked: 5 min
Priority: 0/
Queue: HTML-WikiConverter

People
Owner: diberri [...] cpan.org
Requestors: nachtigall [...] web.de
Cc:
AdminCc:

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



Subject: merge <br><br> to \n\n (2 newlines)
I am using the web-interface. On the pages I want to wiki-convert, I have this double <br /> stuff like crazy. Would it be possible to replace a "<br><br>" with a "\n\n" (2 newlines creating a paragraph (for moin), because that is what the person not knowing to much about html had in sense). If you do so, please also bear in mind cases like <br>[white space]<br />
Show quoted text
> On the pages I want to wiki-convert, I have this double <br /> stuff > like crazy. Would it be possible to replace a "<br><br>" with a > "\n\n"
Why don't you just postprocess the html2wiki output like this for MoinMoin? my $wc = new HTML::WikiConverter( dialect => 'MoinMoin' ); my $wiki = $wc->html2wiki($html); $wiki =~ s/(\[\[BR\]\])(?:\s*\1)+/\n\n/g; I really don't want this type of kludge ending up in HTML::WikiConverter, however. One alternative is to walk the HTML parse tree inserting paragraphs where adjacent linebreaks are found, but I fear that doing so would require a bit of work for something that most people won't use. -- David Iberri