Tags:
create new tag
view all tags

SID-01233: Deprecated Ordered List spec

Status: Answered Answered TWiki version: 5.0.2 Perl version: 5.8.8
Category: CategoryAPI Server OS: AIX 5.3 Last update: 11 years ago

Hello. I'm having a problem with (non-numeric) ordered lists using IE8 (running in IE7 compat mode). They don't work, and I'm not sure if it's because the "type" attribute is deprecated, or it it's something else. I've crudely patched it on my system in Render.pm with the following:

Old code:

 elsif ( $line =~ m/^((\t|   )+)([1AaIi]\.|\d+\.?) ?/ ) {
                # Numbered list
                my $ot = $3;
                $ot =~ s/^(.).*/$1/;
                if( $ot !~ /^\d$/ ) {
                    $ot = ' type="'.$ot.'"';
                } else {
                    $ot = '';
                }
                $line =~ s/^((\t|   )+)([1AaIi]\.|\d+\.?) ?/<li$ot> /;
                _addListItem( $this, \@result, 'ol', 'li', $1 );
                $isList = 1;
            }

New code:

elsif ( $line =~ m/^((\t|   )+)([1AaIi]\.|\d+\.?) ?/ ) {
                # Numbered list
                my $ot = $3;
                $ot =~ s/^(.).*/$1/;
                if( $ot !~ /^\d$/ ) {
                    if( $ot =~ /^A$/ ) {
                        $ot = ' style="list-style-type:upper-alpha"';
                    } elsif( $ot =~ /^a$/ ) {
                        $ot = ' style="list-style-type:lower-alpha"';
                    } elsif( $ot =~ /^I$/ ) {
                        $ot = ' style="list-style-type:upper-roman"';
                    } elsif( $ot =~ /^i$/ ) {
                        $ot = ' style="list-style-type:lower-roman"';
                    } else {
                        #$ot = ' type="'.$ot.'"';
                        $ot = '';
                   }
                } else {
                    $ot = '';
                }
                $line =~ s/^((\t|   )+)([1AaIi]\.|\d+\.?) ?/<li$ot> /;
                _addListItem( $this, \@result, 'ol', 'li', $1 );
                $isList = 1;
            }

Like I said, crude. Would you verify if this is a bug? Thanks.

-- AaronLWalker - 2011-07-14

Discussion and Answer

This looks like a sensible fix. Could you create a bug item and check this in to SVN trunk and 5.0 branch?

-- PeterThoeny - 2011-07-14

This has been fixed and released in TWiki-5.1.2, see TWikibug:Item6921.

-- PeterThoeny - 2012-10-23

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Deprecated Ordered List spec
SupportCategory CategoryAPI
TWiki version 5.0.2
Server OS AIX 5.3
Web server IBM IHS 7
Perl version 5.8.8
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-10-23 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.