@@ -444,18 +444,19 @@ inlineToJATS opts (Note contents) = do
444444 ("rid", "fn" <> tshow notenum)]
445445 $ text (show notenum)
446446inlineToJATS opts (Cite _ lst) =
447− -- TODO revisit this after examining the jats.csl pipeline
448447 inlinesToJATS opts lst
449−inlineToJATS opts (Span ("",_,[]) ils) = inlinesToJATS opts ils
450448inlineToJATS opts (Span (ident,_,kvs) ils) = do
451449 contents <- inlinesToJATS opts ils
452450 let attr = [("id", escapeNCName ident) | not (T.null ident)] ++
453451 [("xml:lang",l) | ("lang",l) <- kvs] ++
454452 [(k,v) | (k,v) <- kvs
455− , k `elem` ["content-type", "rationale",
456− "rid", "specific-use"]]
457− return $ selfClosingTag "milestone-start" attr <> contents <>
458− selfClosingTag "milestone-end" []
453+ , k `elem` ["alt", "content-type", "rid", "specific-use",
454+ "vocab", "vocab-identifier", "vocab-term",
455+ "vocab-term-identifier"]]
456+ return $
457+ if null attr
458+ then contents -- unwrap if no relevant attributes are given
459+ else inTags False "named-content" attr contents
459460inlineToJATS _ (Math t str) = do
460461 let addPref (Xml.Attr q v)
461462 | Xml.qName q == "xmlns" = Xml.Attr q{ Xml.qName = "xmlns:mml" } v