@@ -555,23 +555,23 @@ attrValue attr elt =
555555named :: String -> Element -> Bool
556556named s e = qName (elName e) == s
557557
558−--
558+--
559559
560560acceptingMetadata :: DB a -> DB a
561561acceptingMetadata p = do
562562 modify (\s -> s { dbAcceptsMeta = True } )
563563 res <- p
564564 modify (\s -> s { dbAcceptsMeta = False })
565− return res
565+ return res
566566
567−checkInMeta :: Monoid a => DB () -> DB a
567+checkInMeta :: Monoid a => DB () -> DB a
568568checkInMeta p = do
569− accepts <- dbAcceptsMeta <$> get
570− when accepts p
569+ accepts <- dbAcceptsMeta <$> get
570+ when accepts p
571571 return mempty
572−
573−
574−
572+
573+
574+
575575addMeta :: ToMetaValue a => String -> a -> DB ()
576576addMeta field val = modify (setMeta field val)
577577
@@ -650,9 +650,9 @@ parseBlock (Elem e) =
650650 "attribution" -> return mempty
651651 "titleabbrev" -> return mempty
652652 "authorinitials" -> return mempty
653− "title" -> checkInMeta getTitle
654− "author" -> checkInMeta getAuthor
655− "authorgroup" -> checkInMeta getAuthorGroup
653+ "title" -> checkInMeta getTitle
654+ "author" -> checkInMeta getAuthor
655+ "authorgroup" -> checkInMeta getAuthorGroup
656656 "releaseinfo" -> checkInMeta (getInlines e >>= addMeta "release")
657657 "date" -> checkInMeta getDate
658658 "bibliography" -> sect 0
@@ -717,7 +717,7 @@ parseBlock (Elem e) =
717717 "figure" -> getFigure e
718718 "mediaobject" -> para <$> getImage e
719719 "caption" -> return mempty
720− "info" -> metaBlock
720+ "info" -> metaBlock
721721 "articleinfo" -> metaBlock
722722 "sectioninfo" -> return mempty -- keywords & other metadata
723723 "refsectioninfo" -> return mempty -- keywords & other metadata
@@ -788,12 +788,12 @@ parseBlock (Elem e) =
788788 getInlines s
789789 Nothing -> return mempty
790790 addMeta "title" (tit <> subtit)
791−
791+
792792 getAuthor = (:[]) <$> getInlines e >>= addMeta "author"
793793 getAuthorGroup = do
794794 let terms = filterChildren (named "author") e
795− mapM getInlines terms >>= addMeta "authors"
796− getDate = getInlines e >>= addMeta "date"
795+ mapM getInlines terms >>= addMeta "authors"
796+ getDate = getInlines e >>= addMeta "date"
797797 parseTable = do
798798 let isCaption x = named "title" x || named "caption" x
799799 caption <- case filterChild isCaption e of