@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 Maintainer : Albert Krewinkel <tarleb@moltkeplatz.de>
25 Maintainer : Albert Krewinkel <tarleb@moltkeplatz.de>
27−Conversion of Org-Mode to 'Pandoc' document.
27+Conversion of org-mode formatted plain text to 'Pandoc' document.
29module Text.Pandoc.Readers.Org ( readOrg ) where
29module Text.Pandoc.Readers.Org ( readOrg ) where
@@ -711,7 +711,7 @@ math1CharBetween c = try $ do
712 res <- noneOf $ c:mathForbiddenBorderChars
712 res <- noneOf $ c:mathForbiddenBorderChars
714− eof <|> lookAhead (oneOf mathPostChars) *> return ()
714+ eof <|> () <$ lookAhead (oneOf mathPostChars)
715 return [res]
715 return [res]
717rawMathBetween :: String
717rawMathBetween :: String
@@ -734,12 +734,12 @@ emphasisEnd :: Char -> OrgParser Char
734emphasisEnd c = try $ do
734emphasisEnd c = try $ do
735 guard =<< notAfterForbiddenBorderChar
735 guard =<< notAfterForbiddenBorderChar
737− eof <|> lookAhead (surroundingEmphasisChar >>= \x ->
737+ eof <|> () <$ lookAhead acceptablePostChars
738− oneOf (x ++ emphasisPostChars))
740 updateLastStrPos
738 updateLastStrPos
741 popInlineCharStack
739 popInlineCharStack
741+ where acceptablePostChars =
742+ surroundingEmphasisChar >>= \x -> oneOf (x ++ emphasisPostChars)
744mathStart :: Char -> OrgParser Char
744mathStart :: Char -> OrgParser Char
745mathStart c = try $
745mathStart c = try $
@@ -749,7 +749,7 @@ mathEnd :: Char -> OrgParser Char
749mathEnd c = try $ do
749mathEnd c = try $ do
750 res <- noneOf (c:mathForbiddenBorderChars)
750 res <- noneOf (c:mathForbiddenBorderChars)
752− eof <|> lookAhead (oneOf mathPostChars *> pure ())
752+ eof <|> () <$ lookAhead (oneOf mathPostChars)
753 return res
753 return res