From e321843f321c5c22a48b19933625f0b026b1ad91 Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Sun, 14 Jun 2020 19:43:53 +0200 Subject: Docbook: implement (#6437) A `` is a placeholder that a user is instructed to replace with a value of their own, like `prefix/bin/foo`. In the standard Docbook toolchain, this typically appears emphasized, and no other adornement. But a `` is nearly always in a code element, where emphasis won't work. So we do the same thing as for ``: decorate the content with brackets. --- src/Text/Pandoc/Readers/DocBook.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index 1b1cbf6ab..884595ae8 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -363,7 +363,7 @@ List of all DocBook tags, with [x] indicating implemented, [x] releaseinfo - Information about a particular release of a document [ ] remark - A remark (or comment) intended for presentation in a draft manuscript -[ ] replaceable - Content that may or must be replaced by the user +[x] replaceable - Content that may or must be replaced by the user [ ] returnvalue - The value returned by a function [ ] revdescription - A extended description of a revision to a document [ ] revhistory - A history of the revisions to a document @@ -983,6 +983,8 @@ parseInline (Elem e) = "option" -> codeWithLang "optional" -> do x <- getInlines e return $ str "[" <> x <> str "]" + "replaceable" -> do x <- getInlines e + return $ str "<" <> x <> str ">" "markup" -> codeWithLang "wordasword" -> emph <$> innerInlines "command" -> codeWithLang -- cgit v1.2.3