jats writer: Self closing tags for empty xref (#4187)
This commit is contained in:
parent
3c10951023
commit
de8c47eae8
1 changed files with 5 additions and 2 deletions
|
@ -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"),
|
||||
|
|
Loading…
Add table
Reference in a new issue