Powerpoint writer: use trim
from Shared
Instead of writing my own.
This commit is contained in:
parent
9abcb4f201
commit
0287530a67
2 changed files with 2 additions and 5 deletions
|
@ -76,7 +76,6 @@ import Data.Maybe (maybeToList, fromMaybe)
|
|||
import Text.Pandoc.Highlighting
|
||||
import qualified Data.Text as T
|
||||
import Control.Applicative ((<|>))
|
||||
import Data.Char (isSpace)
|
||||
import Skylighting
|
||||
|
||||
data WriterEnv = WriterEnv { envMetadata :: Meta
|
||||
|
@ -855,9 +854,9 @@ replaceAnchor pe = return pe
|
|||
|
||||
emptyParaElem :: ParaElem -> Bool
|
||||
emptyParaElem (Run _ s) =
|
||||
null $ dropWhile isSpace $ reverse $ dropWhile isSpace $ reverse s
|
||||
null $ Shared.trim s
|
||||
emptyParaElem (MathElem _ ts) =
|
||||
null $ dropWhile isSpace $ reverse $ dropWhile isSpace $ reverse $ unTeXString ts
|
||||
null $ Shared.trim $ unTeXString ts
|
||||
emptyParaElem _ = False
|
||||
|
||||
emptyParagraph :: Paragraph -> Bool
|
||||
|
|
|
@ -33,12 +33,10 @@ compareXMLBool (Elem myElem) (Elem goodElem) =
|
|||
elName myElem == elName goodElem &&
|
||||
elAttribs myElem == elAttribs goodElem &&
|
||||
and (zipWith compareXMLBool (elContent myElem) (elContent goodElem))
|
||||
|
||||
compareXMLBool (Text myCData) (Text goodCData) =
|
||||
cdVerbatim myCData == cdVerbatim goodCData &&
|
||||
cdData myCData == cdData goodCData &&
|
||||
cdLine myCData == cdLine goodCData
|
||||
|
||||
compareXMLBool (CRef myStr) (CRef goodStr) =
|
||||
myStr == goodStr
|
||||
compareXMLBool _ _ = False
|
||||
|
|
Loading…
Add table
Reference in a new issue