mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
jats writer: Self closing tags for empty xref (#4187)
This commit is contained in:
committed by
John MacFarlane
parent
3c10951023
commit
de8c47eae8
@@ -405,8 +405,11 @@ inlineToJATS opts (Link (ident,_,kvs) txt ('#':src, _)) = do
|
||||
[("alt", stringify txt) | not (null txt)] ++
|
||||
[("rid", src)] ++
|
||||
[(k,v) | (k,v) <- kvs, k `elem` ["ref-type", "specific-use"]]
|
||||
contents <- inlinesToJATS opts txt
|
||||
return $ inTags False "xref" attr contents
|
||||
if null txt
|
||||
then return $ selfClosingTag "xref" attr
|
||||
else do
|
||||
contents <- inlinesToJATS opts txt
|
||||
return $ inTags False "xref" attr contents
|
||||
inlineToJATS opts (Link (ident,_,kvs) txt (src, tit)) = do
|
||||
let attr = [("id", ident) | not (null ident)] ++
|
||||
[("ext-link-type", "uri"),
|
||||
|
||||
Reference in New Issue
Block a user