git.iko.soy/typeable/pandoc
on master help sign in
Docbook reader: implement <phrase> (#6438)
89bbe76Mathieu Boespflug
src/Text/Pandoc/Readers/DocBook.hs+7−1
@@ -305,7 +305,7 @@ List of all DocBook tags, with [x] indicating implemented,
305[ ] personblurb - A short description or note about a person
305[ ] personblurb - A short description or note about a person
306[ ] personname - The personal name of an individual
306[ ] personname - The personal name of an individual
307[ ] phone - A telephone number
307[ ] phone - A telephone number
308−[ ] phrase - A span of text
308+[x] phrase - A span of text
309[ ] pob - A post office box in an address
309[ ] pob - A post office box in an address
310[ ] postcode - A postal code in an address
310[ ] postcode - A postal code in an address
311[x] preface - Introductory matter preceding the first chapter of a book
311[x] preface - Introductory matter preceding the first chapter of a book
@@ -956,6 +956,12 @@ parseInline (CRef ref) =
956 return $ text $ maybe (T.toUpper $ T.pack ref) T.pack $ lookupEntity ref
956 return $ text $ maybe (T.toUpper $ T.pack ref) T.pack $ lookupEntity ref
957parseInline (Elem e) =
957parseInline (Elem e) =
958 case qName (elName e) of
958 case qName (elName e) of
959+ "phrase" -> do
960+ let ident = attrValue "id" e
961+ let classes = T.words $ attrValue "class" e
962+ if ident /= "" || classes /= []
963+ then spanWith (ident,classes,[]) <$> innerInlines
964+ else innerInlines
959 "equation" -> equation e displayMath
965 "equation" -> equation e displayMath
960 "informalequation" -> equation e displayMath
966 "informalequation" -> equation e displayMath
961 "inlineequation" -> equation e math
967 "inlineequation" -> equation e math