Coverage for khufu/typography/ol.py : 89%

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 *
4def ol(itemList=[]):
5 """
6 *An ordered list*
8 **Key Arguments**
10 - ``itemList`` -- a list of items to be included in the ordered list
13 **Return**
15 - ol
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()
25 ol = """
26 <ol>
27 %(thisList)s
28 </ol>
29 """ % locals()
31 return ol