Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# encoding: utf-8 

2from . import * 

3 

4def ol(itemList=[]): 

5 """ 

6 *An ordered list* 

7 

8 **Key Arguments** 

9 

10 - ``itemList`` -- a list of items to be included in the ordered list 

11  

12 

13 **Return** 

14 

15 - ol 

16  

17 """ 

18 thisList = "" 

19 for item in itemList: 

20 if "<li" in item[:5]: 

21 thisList = """%(thisList)s\n%(item)s""" % locals() 

22 else: 

23 thisList = """%(thisList)s <li>%(item)s</li>\n""" % locals() 

24 

25 ol = """ 

26 <ol> 

27 %(thisList)s 

28 </ol> 

29 """ % locals() 

30 

31 return ol