aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/TEI.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/TEI.hs')
-rw-r--r--src/Text/Pandoc/Writers/TEI.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/TEI.hs b/src/Text/Pandoc/Writers/TEI.hs
index a592d4f86..82577dd16 100644
--- a/src/Text/Pandoc/Writers/TEI.hs
+++ b/src/Text/Pandoc/Writers/TEI.hs
@@ -282,7 +282,7 @@ inlineToTEI opts (Link attr txt (src, _))
linktext <- inlinesToTEI opts txt
return $ linktext <+> char '(' <> emailLink <> char ')'
| otherwise =
- (inTags False "ref" $ ("target", src) : idFromAttr opts attr)
+ inTags False "ref" (("target", src) : idFromAttr opts attr)
<$> inlinesToTEI opts txt
inlineToTEI opts (Image attr description (src, tit)) = do
let titleDoc = if T.null tit
@@ -300,6 +300,4 @@ inlineToTEI opts (Note contents) =
idFromAttr :: WriterOptions -> Attr -> [(Text, Text)]
idFromAttr opts (id',_,_) =
- if T.null id'
- then []
- else [("xml:id", writerIdentifierPrefix opts <> id')]
+ [("xml:id", writerIdentifierPrefix opts <> id') | not (T.null id')]