Define isRight since it's only in recent versions of Data.Either.

This commit is contained in:
John MacFarlane 2015-02-25 14:45:00 -08:00
parent 9a5e081073
commit 7af3e23bdf

View file

@ -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 "\\ "