From 9282fadc6bc6c56a7f81ba48b75c827dc92eae2e Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Fri, 14 Oct 2016 13:56:24 +0200 Subject: Added tests and a corner case for starting number Review revealed that we didn't handle the case when the starting point is an empty string. While this is not a valid .odt file, we simply added a special case to deal with it. Also added tests for the new feature. --- src/Text/Pandoc/Readers/Odt/StyleReader.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Odt/StyleReader.hs b/src/Text/Pandoc/Readers/Odt/StyleReader.hs index 77f47db29..26ba6df82 100644 --- a/src/Text/Pandoc/Readers/Odt/StyleReader.hs +++ b/src/Text/Pandoc/Readers/Odt/StyleReader.hs @@ -591,6 +591,7 @@ readListLevelStyle levelType = readAttr NsText "level" toListLevelStyle _ p s LinfNone b = ListLevelStyle LltBullet p s LinfNone (startValue b) toListLevelStyle _ p s f@(LinfString _) b = ListLevelStyle LltBullet p s f (startValue b) toListLevelStyle t p s f b = ListLevelStyle t p s f (startValue b) + startValue (Just "") = 1 startValue (Just v) = if all isDigit v then read v else 1 -- cgit v1.2.3