aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Org.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <tarleb@moltkeplatz.de>2014-04-16 13:22:48 +0200
committerAlbert Krewinkel <tarleb@moltkeplatz.de>2014-04-16 13:23:30 +0200
commit346bcea713f933a6cf48829d948e14b9c28b4798 (patch)
treee3a0771bece5b7daf129b0e906c3507687a406bd /src/Text/Pandoc/Readers/Org.hs
parent857fcff7d61100e0ce0872b7e2318c3ad0f9e2fb (diff)
downloadpandoc-346bcea713f933a6cf48829d948e14b9c28b4798.tar.gz
Org reader: Better module description, minor style changes
Use module description analogous to the markdown reader's. Use (<$) where it makes sense.
Diffstat (limited to 'src/Text/Pandoc/Readers/Org.hs')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs12
1 files changed, 6 insertions, 6 deletions
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 <tarleb@moltkeplatz.de>
-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