git.iko.soy/typeable/pandoc
on master help sign in
Docbook: implement <replaceable> (#6437)

A `<replaceable>` is a placeholder that a user is instructed to replace with a value of their own, like `<replaceable>prefix</replacable>/bin/foo`. In the standard Docbook toolchain, this typically appears emphasized, and no other adornement. But a `<replaceable>` is nearly always in a code element, where emphasis won't work. So we do the same thing as for `<optional>`: decorate the content with brackets.

commite321843f321c5c22a48b19933625f0b026b1ad91 authorMathieu Boespflug <m@tweag.io> dateSun 14 Jun 2020, 19:43 (6 years ago) parent12a35dd
1 file changed+3−1
src/Text/Pandoc/Readers/DocBook.hs+3−1
src/Text/Pandoc/Readers/DocBook.hs+3−1
@@ -363,7 +363,7 @@ List of all DocBook tags, with [x] indicating implemented,
363363[x] releaseinfo - Information about a particular release of a document
364364[ ] remark - A remark (or comment) intended for presentation in a draft
365365 manuscript
366−[ ] replaceable - Content that may or must be replaced by the user
366+[x] replaceable - Content that may or must be replaced by the user
367367[ ] returnvalue - The value returned by a function
368368[ ] revdescription - A extended description of a revision to a document
369369[ ] revhistory - A history of the revisions to a document
@@ -983,6 +983,8 @@ parseInline (Elem e) =
983983 "option" -> codeWithLang
984984 "optional" -> do x <- getInlines e
985985 return $ str "[" <> x <> str "]"
986+ "replaceable" -> do x <- getInlines e
987+ return $ str "<" <> x <> str ">"
986988 "markup" -> codeWithLang
987989 "wordasword" -> emph <$> innerInlines
988990 "command" -> codeWithLang