Skip Menu |
 

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

Report information
The Basics
Id: 40882
Status: open
Priority: 0/
Queue: HTML-WikiConverter-MediaWiki

People
Owner: diberri [...] cpan.org
Requestors: dan.bolser [...] gmail.com
Cc:
AdminCc:

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



Subject: Handling of <BR>'s?
Date: Thu, 13 Nov 2008 09:19:11 +0000
To: bug-html-wikiconverter-mediawiki [...] rt.cpan.org
From: "Dan Bolser" <dan.bolser [...] gmail.com>
Download (untitled) / with headers
text/plain 355b
I noticed that <BR> tags are just passed through - I wonder if you could instead handle them just like <P>'s? I figure its trivial to pass the rules for the P tag to the BR tag, but I think this should be the default (or at least an option) rather than an 'ad-hoc' patch. Thanks for the great package! Dan. -- http://network.nature.com/profile/dan
Subject: Add option to handle <br/> like paragraph break
Download (untitled) / with headers
text/plain 1.1k
Hi Dan, On Thu Nov 13 04:20:11 2008, dan.bolser wrote: Show quoted text
> I noticed that <BR> tags are just passed through - I wonder if you could > instead handle them just like <P>'s?
Thanks for the comment. I think I know what you're talking about, but just want to clarify. The current behavior is to convert this HTML: <p>Sentence one.<br/> Sentence two.</p> into this MediaWiki markup: Sentence one.<br/> Sentence two. What you are asking for is that the same incoming HTML be converted into this MediaWiki markup: Sentence one. Sentence two. Sans "<br/>" and with the <br/> treated like a paragraph break. Is that right? Show quoted text
> I figure its trivial to pass the rules for the P tag to the BR tag, but I > think this should be the default (or at least an option) rather than an > 'ad-hoc' patch.
I'm not sure how trivial it is; unfortunately, I can't just pass the <p> rules over to the <br> tag because <p> elements are block-level elements, while <br>s are "empty" tags (they don't contain text). However, I suspect it can be done without undue difficulty. I'll see what I can do about adding an option. Thanks again for the report. Cheers, David Iberri
Subject: Re: [rt.cpan.org #40882] Add option to handle <br/> like paragraph break
Date: Thu, 13 Nov 2008 13:41:25 +0000
To: bug-HTML-WikiConverter-MediaWiki [...] rt.cpan.org
From: "Dan Bolser" <dan.bolser [...] gmail.com>
Download (untitled) / with headers
text/plain 2.2k
Wow! Thanks for the speedy reply! 2008/11/13 David Iberri via RT <bug-HTML-WikiConverter-MediaWiki@rt.cpan.org>: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40882 > > > Hi Dan, > > On Thu Nov 13 04:20:11 2008, dan.bolser wrote:
>> I noticed that <BR> tags are just passed through - I wonder if you could >> instead handle them just like <P>'s?
> > Thanks for the comment. I think I know what you're talking about, but > just want to clarify. The current behavior is to convert this HTML: > > <p>Sentence one.<br/> > Sentence two.</p> > > into this MediaWiki markup: > > Sentence one.<br/> > Sentence two. > > What you are asking for is that the same incoming HTML be converted into > this MediaWiki markup: > > Sentence one. > > Sentence two. > > Sans "<br/>" and with the <br/> treated like a paragraph break. Is that > right?
Yeah. I just read up on the true difference between BR and P - http://wiki.answers.com/Q/What_is_the_difference_between_br_and_p_in_html But in MediaWiki I don't think that the distinction has an analogous markup. So yeah, its possible that in HTML someone would type: item one<br> item two<br> item three<br> For some reaon I like to type that (in MediaWiki) as: item one item two item three I think the result is the same... let me check... Hmm... Actually the result looks somewhat different, the former creating less whitespace between lines. Personally I don't like to see any html in my wikitext, so I would tend to use the latter (or a proper list) Show quoted text
>
>> I figure its trivial to pass the rules for the P tag to the BR tag, but I >> think this should be the default (or at least an option) rather than an >> 'ad-hoc' patch.
> > I'm not sure how trivial it is; unfortunately, I can't just pass the <p> > rules over to the <br> tag because <p> elements are block-level > elements, while <br>s are "empty" tags (they don't contain text). > However, I suspect it can be done without undue difficulty. I'll see > what I can do about adding an option. > > Thanks again for the report.
Oh, I thought it would be '$wp->rules_for_tag( "br" ) = $wp->rules_for_tag( "p" )'. I see that this issue isn't 100%, so I'll leave it up to you to decide what to do... Thank you for the great package!!! Dan. Show quoted text
> Cheers, > David Iberri >
-- http://network.nature.com/profile/dan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.