JATS reader: handle author-notes.
This commit is contained in:
parent
4612a9a8c1
commit
c7e5543c29
1 changed files with 6 additions and 5 deletions
|
@ -308,8 +308,12 @@ getAuthors e = do
|
|||
authors <- mapM getContrib $ filterElements
|
||||
(\x -> named "contrib" x &&
|
||||
attrValue "contrib-type" x == "author") e
|
||||
unless (null authors) $
|
||||
addMeta "author" authors
|
||||
authorNotes <- mapM getInlines $ filterElements (named "author-notes") e
|
||||
let authors' = case (reverse authors, authorNotes) of
|
||||
([], _) -> []
|
||||
(_, []) -> authors
|
||||
(a:as, ns) -> reverse as ++ [a <> mconcat ns]
|
||||
unless (null authors) $ addMeta "author" authors'
|
||||
|
||||
getAffiliations :: PandocMonad m => Element -> JATS m ()
|
||||
getAffiliations x = do
|
||||
|
@ -467,9 +471,6 @@ parseInline (Elem e) =
|
|||
"uri" -> return $ link (strContent e) "" $ str $ strContent e
|
||||
"fn" -> (note . mconcat) <$>
|
||||
mapM parseBlock (elContent e)
|
||||
-- Note: this isn't a real docbook tag; it's what we convert
|
||||
-- <?asciidor-br?> to in handleInstructions, above. A kludge to
|
||||
-- work around xml-light's inability to parse an instruction.
|
||||
_ -> innerInlines
|
||||
where innerInlines = (trimInlines . mconcat) <$>
|
||||
mapM parseInline (elContent e)
|
||||
|
|
Loading…
Add table
Reference in a new issue