diff --git a/src/MdToHTML.hs b/src/MdToHTML.hs
index c9370d5..c4cea44 100644
--- a/src/MdToHTML.hs
+++ b/src/MdToHTML.hs
@@ -301,6 +301,19 @@ parseUListLineItem :: ReadP MdToken
parseUListLineItem = do
firstChar <- choice (map char ['*', '+', '-'])
char ' ' -- At least one space between list indicator and list text.
+ parseListLineItemCommon
+
+-- Parse an ordered list line item.
+parseOListLineItem :: ReadP MdToken
+parseOListLineItem = do
+ num <- greedyParse1 (satisfy isDigit)
+ char '.'
+ char ' ' -- At least one space between list indicator and list text.
+ parseListLineItemCommon
+
+-- Common code for parsing list line items
+parseListLineItemCommon :: ReadP MdToken
+parseListLineItemCommon = do
skipSpaces
restOfLine <- many1 parseListLineToken
void (char '\n') <++ eof