Skip Menu |

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

Report information
The Basics
Id: 33670
Status: resolved
Priority: 0/
Queue: Text-Trac

People
Owner: miya [...] mizzy.org
Requestors: dwheeler [...] cpan.org
Cc:
AdminCc:

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



Subject: Lists Not Properly Nested
Date: Thu, 28 Feb 2008 11:09:23 -0800
To: bug-Text-Trac [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
Nested HTML lists should be like this: <ul> <li>foo <ul> <li>bar</li> </ul> </li> </ul> Not like this: <ul> <li>foo</li> <ul> <li>bar</li> </ul> </ul> The latter is invalid, and is unfortunately the pattern used by Text::Trac. The same issue exists for ordred lists. The attached patch updates the tests to demonstrate the issue. --- t/01-text-trac.t 2008-02-28 11:01:32.000000000 -0800 +++ t/01-text-trac.t 2008-02-28 11:06:33.000000000 -0800 @@ -124,9 +124,9 @@ * list 2-2 --- expected <ul><li>list 1-1</li> -<li>list 1-2</li> +<li>list 1-2K_ <ul><li>list 2-1</li> -<li>list 2-2</li></ul></ul> +<li>list 2-2</li></ul></li></ul> ### ol test --- input @@ -136,9 +136,9 @@ a. list a-2 --- expected <ol start="1"><li>list 1-1</li> -<li>list 1-2</li> +<li>list 1-2 <ol class="loweralpha"><li>list a-1</li> -<li>list a-2</li></ol></ol> +<li>list a-2</li></ol></li></ol> ### blockauote test --- input Thanks, David
FYI: The reason for these bug reports is because I've integrated Text::Trac with SVN::Notify. Example output here (with the nested lists corrected, in expectation of a fix for this bug report): http://www.justatheory.com/computers/programming/perl/modules/svnnotify-2.70_trac_example.html I'll be releasing it tomorrow, I expect, and will post a blog entry about it. Cheers, David
On Fri Feb 29 01:31:53 2008, DWHEELER wrote: Show quoted text
> I'll be releasing it tomorrow, I expect, and will post a blog entry > about it.
And here it is: http://justatheory.com/computers/programming/perl/modules/svnnotify-2.70.html Best, David
From: miya [...] mizzy.org
Hi, Show quoted text
>
http://www.justatheory.com/computers/programming/perl/modules/svnnotify-2.70_trac_example.html Great!I'd like to use it. I'v commited fixed version to the svn repo. http://svn.coderepos.org/share/lang/perl/Text-Trac/trunk/ Because of this fix, positions of return characters in lists are not like before, but lists are nested properly, I think. Please check it before I release this module to the cpan site. Thanks.
Subject: Re: [rt.cpan.org #33670] Lists Not Properly Nested
Date: Sun, 2 Mar 2008 12:46:22 -0800
To: bug-Text-Trac [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Mar 2, 2008, at 00:38, Gosuke Miyashita via RT wrote: Show quoted text
> I'v commited fixed version to the svn repo. > http://svn.coderepos.org/share/lang/perl/Text-Trac/trunk/ > > Because of this fix, positions of return characters in lists are > not like before, but lists are nested properly, I think. > > Please check it before I release this module to the cpan site.
Thanks. Almost there, but not quite. There are some closing </li>s missing. This patch demonstrates: --- t/04-list.t (revision 7383) +++ t/04-list.t (working copy) @@ -117,3 +117,21 @@ <ol class="loweralpha"><li>list 2-1 </li><li>list 2-2 </li><li>list 2-3</li></ol> + +### SVN::Notify set example set. +--- input + * Item 1 + * Item 1.1 + * Item 1.1.1 + * Item 1.1.2 + * Item 1.1.3 + * Item 1.2 + * Item 2 +--- expected +<ul><li>Item 1 +<ul><li>Item 1.1 +<ul><li>Item 1.1.1 +</li><li>Item 1.1.2 +</li><li>Item 1.1.3 +</li></ul></li><li>Item 1.2 +</li></ul></li><li>Item 2</li></ul> Best, David
Thanks for you additional bug report. I fixed it and released it as 0.10 to the cpan site. Thanks.
Subject: Re: [rt.cpan.org #33670] Lists Not Properly Nested
Date: Tue, 4 Mar 2008 09:47:50 -0800
To: bug-Text-Trac [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Mar 3, 2008, at 06:01, Gosuke Miyashita via RT wrote: Show quoted text
> Thanks for you additional bug report. > I fixed it and released it as 0.10 to the cpan site.
Confirmed, thanks! The only other errors I get when I validate the SVN::Notify output are: * '<ol start="1">: there is no attribute "start".' Maybe there's a CSS style to use instead? Hrm, guess not: http://www.webmasterworld.com/css/3119510.htm * '<h2 id="EscapingLinksand!WikiPageNames">: character "!" is not allowed in the value of attribute "id".' Is that something specific to Trac? Thanks, David
Show quoted text
> The only other errors I get when I validate the SVN::Notify output are: > > * '<ol start="1">: there is no attribute "start".' > > Maybe there's a CSS style to use instead? Hrm, guess not: > > http://www.webmasterworld.com/css/3119510.htm
Trac parse this text: 2. Item 1 2. Item 2 as: <ol start="2"><li>Item 1 </li><li>Item 2 </li></ol> So I add "start" attribute.But If it begins with 1, there is no "start" attribute.So I fixed the module not to add "start" if it begins with 1. Show quoted text
> * '<h2 id="EscapingLinksand!WikiPageNames">: character "!" is not > allowed in the value of attribute "id".' > > Is that something specific to Trac?
I fixed the module to strip character "!" in id attribute, and released version 0.11 with above fixes. Thnaks a lot.
Subject: Re: [rt.cpan.org #33670] Lists Not Properly Nested
Date: Wed, 5 Mar 2008 14:33:42 -0800
To: bug-Text-Trac [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Mar 5, 2008, at 08:46, Gosuke Miyashita via RT wrote: Show quoted text
> Trac parse this text: > > 2. Item 1 > 2. Item 2 > > as: > > <ol start="2"><li>Item 1 > </li><li>Item 2 > </li></ol> > > So I add "start" attribute.But If it begins with 1, > there is no "start" attribute.So I fixed the module > not to add "start" if it begins with 1.
Oh, good, that's smart. Show quoted text
>> * '<h2 id="EscapingLinksand!WikiPageNames">: character "!" is not >> allowed in the value of attribute "id".' >> >> Is that something specific to Trac?
> > I fixed the module to strip character "!" in id attribute, > and released version 0.11 with above fixes.
Nice, thanks. David