@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2424
2525 Maintainer : Albert Krewinkel <tarleb@moltkeplatz.de>
2626
27−Conversion of Org-Mode to 'Pandoc' document.
27+Conversion of org-mode formatted plain text to 'Pandoc' document.
2828-}
2929module Text.Pandoc.Readers.Org ( readOrg ) where
3030
@@ -711,7 +711,7 @@ math1CharBetween c = try $ do
711711 char c
712712 res <- noneOf $ c:mathForbiddenBorderChars
713713 char c
714− eof <|> lookAhead (oneOf mathPostChars) *> return ()
714+ eof <|> () <$ lookAhead (oneOf mathPostChars)
715715 return [res]
716716
717717rawMathBetween :: String
@@ -734,12 +734,12 @@ emphasisEnd :: Char -> OrgParser Char
734734emphasisEnd c = try $ do
735735 guard =<< notAfterForbiddenBorderChar
736736 char c
737− eof <|> lookAhead (surroundingEmphasisChar >>= \x ->
738− oneOf (x ++ emphasisPostChars))
739− *> return ()
737+ eof <|> () <$ lookAhead acceptablePostChars
740738 updateLastStrPos
741739 popInlineCharStack
742740 return c
741+ where acceptablePostChars =
742+ surroundingEmphasisChar >>= \x -> oneOf (x ++ emphasisPostChars)
743743
744744mathStart :: Char -> OrgParser Char
745745mathStart c = try $
@@ -749,7 +749,7 @@ mathEnd :: Char -> OrgParser Char
749749mathEnd c = try $ do
750750 res <- noneOf (c:mathForbiddenBorderChars)
751751 char c
752− eof <|> lookAhead (oneOf mathPostChars *> pure ())
752+ eof <|> () <$ lookAhead (oneOf mathPostChars)
753753 return res
754754
755755