diff options
| author | Frerich Raabe <frerich.raabe@betterdoc.de> | 2022-05-12 04:07:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-11 19:07:03 -0700 |
| commit | b888a8c77e35cc028725aff0f581475ec0481af9 (patch) | |
| tree | 89fedb6f9d0ad8c05d235b1af475439f01e2acc2 /src/Text | |
| parent | b0195b7ef4d55c1d7339cd77aa0e3a039a095807 (diff) | |
Improved reading <xref> elements in DocBook files (#8065)
<xref> elements can also be used to link to <figure> elements. Alas, the
DocBook reader was not aware of this and thus generated a link text
which just said 'figure_title'.
https://tdg.docbook.org/tdg/4.5/figure.html explains that <figure>
elements can contain <title> elements, so let's try to use that if it is
available.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index 581a93e68..b7a2b06ea 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -1342,6 +1342,7 @@ parseInline (Elem e) = "sect5" -> descendantContent "title" el "cmdsynopsis" -> descendantContent "command" el "funcsynopsis" -> descendantContent "function" el + "figure" -> descendantContent "title" el _ -> qName (elName el) <> "_title" where xrefLabel = attrValue "xreflabel" el |
