git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: handle keycombo, keycap.
9e83cd6John MacFarlane
src/Text/Pandoc/Readers/DocBook.hs+6−2
@@ -206,10 +206,10 @@ List of all DocBook tags, with [x] indicating implemented,
206 other dingbat
206 other dingbat
207[ ] itermset - A set of index terms in the meta-information of a document
207[ ] itermset - A set of index terms in the meta-information of a document
208[ ] jobtitle - The title of an individual in an organization
208[ ] jobtitle - The title of an individual in an organization
209−[ ] keycap - The text printed on a key on a keyboard
209+[x] keycap - The text printed on a key on a keyboard
210[ ] keycode - The internal, frequently numeric, identifier for a key
210[ ] keycode - The internal, frequently numeric, identifier for a key
211 on a keyboard
211 on a keyboard
212−[ ] keycombo - A combination of input actions
212+[x] keycombo - A combination of input actions
213[ ] keysym - The symbolic name of a key on a keyboard
213[ ] keysym - The symbolic name of a key on a keyboard
214[ ] keyword - One of a set of keywords describing the content of a document
214[ ] keyword - One of a set of keywords describing the content of a document
215[ ] keywordset - A set of keywords describing the content of a document
215[ ] keywordset - A set of keywords describing the content of a document
@@ -923,6 +923,8 @@ parseInline (Elem e) =
923 "constant" -> codeWithLang
923 "constant" -> codeWithLang
924 "userinput" -> codeWithLang
924 "userinput" -> codeWithLang
925 "varargs" -> return $ code "(...)"
925 "varargs" -> return $ code "(...)"
926+ "keycap" -> return (str $ strContent e)
927+ "keycombo" -> keycombo <$> (mapM parseInline $ elContent e)
926 "xref" -> return $ str "?" -- so at least you know something is there
928 "xref" -> return $ str "?" -- so at least you know something is there
927 "email" -> return $ link ("mailto:" ++ strContent e) ""
929 "email" -> return $ link ("mailto:" ++ strContent e) ""
928 $ str $ strContent e
930 $ str $ strContent e
@@ -977,3 +979,5 @@ parseInline (Elem e) =
977 then mempty
979 then mempty
978 else strong tit <> linebreak
980 else strong tit <> linebreak
979 return $ linebreak <> tit' <> segs
981 return $ linebreak <> tit' <> segs
982+ keycombo = spanWith ("",["keycombo"],[]) .
983+ mconcat . intersperse (str "+")