diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-02-25 14:45:00 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-02-25 14:45:00 -0800 |
commit | 7af3e23bdf18fe41cea1dc6bac8bf623161ac473 (patch) | |
tree | c4a2be312b5a372e3e81277a3e7419ce90d92959 /src | |
parent | 9a5e08107386b5592761985fdbc111d42b91caf4 (diff) | |
download | pandoc-7af3e23bdf18fe41cea1dc6bac8bf623161ac473.tar.gz |
Define isRight since it's only in recent versions of Data.Either.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 5cc1b3444..8b126a562 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -39,7 +39,6 @@ import Text.Pandoc.Writers.Shared import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (blankline, blanklines, char, space) import Data.Maybe (fromMaybe) -import Data.Either (isRight) import Data.List ( group, stripPrefix, find, intersperse, transpose, sortBy ) import Data.Char ( isSpace, isPunctuation ) import Data.Ord ( comparing ) @@ -713,6 +712,10 @@ inlineListToMarkdown opts lst = do ')':_ -> True _ -> False +isRight :: Either a b -> Bool +isRight (Right _) = True +isRight (Left _) = False + escapeSpaces :: Inline -> Inline escapeSpaces (Str s) = Str $ substitute " " "\\ " s escapeSpaces Space = Str "\\ " |