Edgewall Software
Modify

Opened 17 years ago

Closed 14 years ago

Last modified 14 years ago

#4819 closed defect (duplicate)

ordered lists that start with numbers greater than 9 start at 1

Reported by: Harlan Iverson Owned by: Christian Boos
Priority: low Milestone:
Component: wiki system Version: 0.10.3
Severity: normal Keywords:
Cc: ryano@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Lists that are supposed start with any number greater than 9 actually start at 1. Possibly related to #2446.

example:

 10. This item should start with ten
 1. I should be eleven

output:

  1. This item should start with ten
  2. I should be eleven

Attachments (0)

Change History (7)

comment:1 by Christian Boos, 17 years ago

Milestone: 0.12
Priority: normallow

comment:2 by flyingfred0@…, 17 years ago

The following patch seemed to fix the problem for me:

--- trac/wiki/formatter.py	(revision 5695)
+++ trac/wiki/formatter.py	(working copy)
@@ -462,7 +462,7 @@
             type_ = 'ul'
         else:
             type_ = 'ol'
-            idx = '01iI'.find(listid)
+            idx = '0iI'.find(listid)
             if idx >= 0:
                 class_ = ('arabiczero', None, 'lowerroman', 'upperroman')[idx]
             elif listid.isdigit():

I tried with these test cases:

 10. Ten
 1. Eleven
 1. Twelve
 1. Thirteen

 10. Ten
 11. Eleven
 12. Twelve
 13. Thirteen

When it works correctly, the list number should be the same as the list item. Without the patch, the lists are numbered 1,2,3,4.

  1. Ten
  2. Eleven
  3. Twelve
  4. Thirteen
  1. Ten
  2. Eleven
  3. Twelve
  4. Thirteen

comment:3 by mromani@…, 15 years ago

I can confirm that the proposed patch solves the problem in trac 0.10.3.1

Thank you.

comment:4 by Ryan Ollos <ryano@…>, 15 years ago

Cc: ryano@… added

comment:5 by lkraav <leho@…>, 14 years ago

i just ran into this, saw #8958 in timeline. 0.12-multirepos-r9032 currently also truncates all numbers starting with 1x(xx..) → 1. other numbers, 20. 30. 345. seem to work fine.

comment:6 by Christian Boos, 14 years ago

Milestone: next-major-0.1X
Resolution: fixed
Status: newclosed

Duplicate of #8892, which was fixed for 0.12.

comment:7 by Christian Boos, 14 years ago

Resolution: fixedduplicate

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.