summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-02-03 05:48:46 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-02-03 05:48:46 +0000
commit6f0d4e49d16e9acb236221597d21e4139347897d (patch)
tree57bfabe1d9102a715f4f09af4a1631acaccf070b /src/Text
parent14bc8ffc2ec4fb5dfedec4ec4fcea4c2ef84174c (diff)
Require two spaces after capital letter + period for list item.
Otherwise "E. coli" starts a list. This might change the semantics of some existing documents, since previously the two-space requirement was only enforced when the second word started with a capital letter. But it is consistent with the existing documentation and follows the principle of least surprise. Resolves Issue #212. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1829 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 82d40489d..e3052386a 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -33,7 +33,7 @@ module Text.Pandoc.Readers.Markdown (
import Data.List ( transpose, isPrefixOf, isSuffixOf, sortBy, findIndex, intercalate )
import Data.Ord ( comparing )
-import Data.Char ( isAlphaNum, isUpper )
+import Data.Char ( isAlphaNum )
import Data.Maybe
import Text.Pandoc.Definition
import Text.Pandoc.Shared
@@ -479,7 +479,7 @@ anyOrderedListStart = try $ do
-- if it could be an abbreviated first name, insist on more than one space
if delim == Period && (style == UpperAlpha || (style == UpperRoman &&
num `elem` [1, 5, 10, 50, 100, 500, 1000]))
- then char '\t' <|> (char ' ' >>~ notFollowedBy (satisfy isUpper))
+ then char '\t' <|> (try $ char ' ' >> spaceChar)
else spaceChar
skipSpaces
return (num, style, delim)