From 346bcea713f933a6cf48829d948e14b9c28b4798 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Wed, 16 Apr 2014 13:22:48 +0200 Subject: Org reader: Better module description, minor style changes Use module description analogous to the markdown reader's. Use (<$) where it makes sense. --- src/Text/Pandoc/Readers/Org.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs index bda0b0262..c4ea64ba7 100644 --- a/src/Text/Pandoc/Readers/Org.hs +++ b/src/Text/Pandoc/Readers/Org.hs @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Maintainer : Albert Krewinkel -Conversion of Org-Mode to 'Pandoc' document. +Conversion of org-mode formatted plain text to 'Pandoc' document. -} module Text.Pandoc.Readers.Org ( readOrg ) where @@ -711,7 +711,7 @@ math1CharBetween c = try $ do char c res <- noneOf $ c:mathForbiddenBorderChars char c - eof <|> lookAhead (oneOf mathPostChars) *> return () + eof <|> () <$ lookAhead (oneOf mathPostChars) return [res] rawMathBetween :: String @@ -734,12 +734,12 @@ emphasisEnd :: Char -> OrgParser Char emphasisEnd c = try $ do guard =<< notAfterForbiddenBorderChar char c - eof <|> lookAhead (surroundingEmphasisChar >>= \x -> - oneOf (x ++ emphasisPostChars)) - *> return () + eof <|> () <$ lookAhead acceptablePostChars updateLastStrPos popInlineCharStack return c + where acceptablePostChars = + surroundingEmphasisChar >>= \x -> oneOf (x ++ emphasisPostChars) mathStart :: Char -> OrgParser Char mathStart c = try $ @@ -749,7 +749,7 @@ mathEnd :: Char -> OrgParser Char mathEnd c = try $ do res <- noneOf (c:mathForbiddenBorderChars) char c - eof <|> lookAhead (oneOf mathPostChars *> pure ()) + eof <|> () <$ lookAhead (oneOf mathPostChars) return res -- cgit v1.2.3