Advertisement
Guest User

Patch for list elements

a guest
Aug 23rd, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.06 KB | None | 0 0
  1. Index: Render.pm
  2. ===================================================================
  3. --- Render.pm   (revision 16847)
  4. +++ Render.pm   (working copy)
  5. @@ -62,6 +62,13 @@
  6.  <span class="foswikiNewLink">$text<a href="%SCRIPTURLPATH{"edit"}%/$web/$topic?topicparent=%WEB%.%TOPIC%" rel="nofollow" title="%MAKETEXT{"Create this topic"}%">?</a></span>
  7.  NLF
  8.  
  9. +my %list_types = (
  10. +    A => 'upper-alpha',
  11. +    a => 'lower-alpha',
  12. +    i => 'lower-roman',
  13. +    I => 'upper-roman'
  14. +    );
  15. +
  16.  BEGIN {
  17.  
  18.      # Do a dynamic 'use locale' for this module
  19. @@ -440,12 +447,12 @@
  20.                  $isList = 1;
  21.              }
  22.              elsif ( $line =~ m/^((\t|   )+)([1AaIi]\.|\d+\.?) ?/ ) {
  23. -
  24.                  # Numbered list
  25.                  my $ot = $3;
  26.                  $ot =~ s/^(.).*/$1/;
  27.                  if ( $ot !~ /^\d$/ ) {
  28. -                    $ot = ' type="' . $ot . '"';
  29. +           # Use style="list-type-type:"
  30. +                    $ot = ' style="list-style-type:' . $list_types{$ot} . '"';
  31.                  }
  32.                  else {
  33.                      $ot = '';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement