Forum: Redcloth new format for specifying list classes?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jason G. (Guest)
on 2009-03-05 17:21
(Received via mailing list)
Hi, RedCloth folks.  The other day, I tried this:
>   *(class-one) one
>   *(class-two) two
>   *(class-three) three
thinking I'd get this:
>   <ul>
>     <li class="class-one">one</li>
>     <li class="class-two">two</li>
>     <li class="class-three">three</li>
>   </ul>

But that's not how it works.  RedCloth 3 & 4 and Textile 2 both make
the class/id you put on the first item in the list the class/id for
the whole list.  When you put classes/ids on subsequent list items,
RedCloth 3 blows up, Textile2 makes them completely separate lists,
and RedCloth 4 puts classes on the wrong list items (I'm fixing that
now).

Here's what PyTextile does:
> # two
> # three

What do you think?  Stick close to Textile 2 or go the PyTetxile way
to expand Textile's breadth of expression?  It will break backward
compatibility but I really want this feature. :-)

Jason
David R. (Guest)
on 2009-03-05 22:13
(Received via mailing list)
Funny, i was just trying to do this myself last week, and saw the same
issue. I made it work (putting the class on the ul element), but it felt
dirty. I just had the feeling it shouldn't work like that. almost
resorted to html. (!)

This is a tough call...

My vote: onward an upward!  Make it work like it should have all along.
If they're savvy enough to be adding classes to list elements in
textile, they're savvy enough to figure out how to fix their old (kind
of hacky) markup.

david
Gerald B. (Guest)
on 2009-03-06 09:15
(Received via mailing list)
Hello,

>>
>> #(class#id) one
>> # two
>> # three
>
> What do you think?  Stick close to Textile 2 or go the PyTetxile way to
> expand Textile's breadth of expression?  It will break backward
> compatibility but I really want this feature. :-)

  I support/prefer the PyTextile way. Using the new semantics is a
great addition to mark steps/incrementals in presentations e.g.

(step)# one
# two
# three

  Let's you mark all list items at once.

#one
#(step) two
#(step) three

   Let's you mark individual items. I tried it before with the "old"
version of RedCloth/Textile but it was not possible [1].

   Cheers.

[1] http://groups.google.com/group/webslideshow/msg/a0...
This topic is locked and can not be replied to.