@@ -316,6 +316,9 @@ tableItemToJATS :: PandocMonad m
316316 -> Bool
317317 -> [Block]
318318 -> JATS m Doc
319+tableItemToJATS opts isHeader [Plain item] =
320+ inTags True (if isHeader then "th" else "td") [] <$>
321+ inlinesToJATS opts item
319322tableItemToJATS opts isHeader item =
320323 (inTags True (if isHeader then "th" else "td") [] . vcat) <$>
321324 mapM (blockToJATS opts) item
@@ -405,8 +408,11 @@ inlineToJATS opts (Link (ident,_,kvs) txt ('#':src, _)) = do
405408 [("alt", stringify txt) | not (null txt)] ++
406409 [("rid", src)] ++
407410 [(k,v) | (k,v) <- kvs, k `elem` ["ref-type", "specific-use"]]
408− contents <- inlinesToJATS opts txt
409− return $ inTags False "xref" attr contents
411+ if null txt
412+ then return $ selfClosingTag "xref" attr
413+ else do
414+ contents <- inlinesToJATS opts txt
415+ return $ inTags False "xref" attr contents
410416inlineToJATS opts (Link (ident,_,kvs) txt (src, tit)) = do
411417 let attr = [("id", ident) | not (null ident)] ++
412418 [("ext-link-type", "uri"),