summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-04-04 21:34:12 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-04-04 21:34:12 -0700
commitc5a0c7a8199698c3973e50db9e91ae2694e018d4 (patch)
tree5650597067b9f49244178be4e9d628d4060e1e10 /src
parentc99ecf6cc566a90eef1816eb5a1a1167b81ad9ac (diff)
Removed trailing whitespace.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs
index 279f1e7f8..28af646c1 100644
--- a/src/Text/Pandoc/Readers/DocBook.hs
+++ b/src/Text/Pandoc/Readers/DocBook.hs
@@ -555,23 +555,23 @@ attrValue attr elt =
named :: String -> Element -> Bool
named s e = qName (elName e) == s
---
+--
acceptingMetadata :: DB a -> DB a
acceptingMetadata p = do
modify (\s -> s { dbAcceptsMeta = True } )
res <- p
modify (\s -> s { dbAcceptsMeta = False })
- return res
+ return res
-checkInMeta :: Monoid a => DB () -> DB a
+checkInMeta :: Monoid a => DB () -> DB a
checkInMeta p = do
- accepts <- dbAcceptsMeta <$> get
- when accepts p
+ accepts <- dbAcceptsMeta <$> get
+ when accepts p
return mempty
-
-
-
+
+
+
addMeta :: ToMetaValue a => String -> a -> DB ()
addMeta field val = modify (setMeta field val)
@@ -650,9 +650,9 @@ parseBlock (Elem e) =
"attribution" -> return mempty
"titleabbrev" -> return mempty
"authorinitials" -> return mempty
- "title" -> checkInMeta getTitle
- "author" -> checkInMeta getAuthor
- "authorgroup" -> checkInMeta getAuthorGroup
+ "title" -> checkInMeta getTitle
+ "author" -> checkInMeta getAuthor
+ "authorgroup" -> checkInMeta getAuthorGroup
"releaseinfo" -> checkInMeta (getInlines e >>= addMeta "release")
"date" -> checkInMeta getDate
"bibliography" -> sect 0
@@ -717,7 +717,7 @@ parseBlock (Elem e) =
"figure" -> getFigure e
"mediaobject" -> para <$> getImage e
"caption" -> return mempty
- "info" -> metaBlock
+ "info" -> metaBlock
"articleinfo" -> metaBlock
"sectioninfo" -> return mempty -- keywords & other metadata
"refsectioninfo" -> return mempty -- keywords & other metadata
@@ -788,12 +788,12 @@ parseBlock (Elem e) =
getInlines s
Nothing -> return mempty
addMeta "title" (tit <> subtit)
-
+
getAuthor = (:[]) <$> getInlines e >>= addMeta "author"
getAuthorGroup = do
let terms = filterChildren (named "author") e
- mapM getInlines terms >>= addMeta "authors"
- getDate = getInlines e >>= addMeta "date"
+ mapM getInlines terms >>= addMeta "authors"
+ getDate = getInlines e >>= addMeta "date"
parseTable = do
let isCaption x = named "title" x || named "caption" x
caption <- case filterChild isCaption e of