summaryrefslogtreecommitdiff
path: root/test/docbook-xref.native
diff options
context:
space:
mode:
authorFrerich Raabe <frerich.raabe@betterdoc.de>2022-05-12 04:07:03 +0200
committerGitHub <noreply@github.com>2022-05-11 19:07:03 -0700
commitb888a8c77e35cc028725aff0f581475ec0481af9 (patch)
tree89fedb6f9d0ad8c05d235b1af475439f01e2acc2 /test/docbook-xref.native
parentb0195b7ef4d55c1d7339cd77aa0e3a039a095807 (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 'test/docbook-xref.native')
-rw-r--r--test/docbook-xref.native40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/docbook-xref.native b/test/docbook-xref.native
index 2983eac0c..bcfe434a4 100644
--- a/test/docbook-xref.native
+++ b/test/docbook-xref.native
@@ -141,6 +141,33 @@ Pandoc
, Str "."
]
]
+ , [ Para
+ [ Str "A"
+ , Space
+ , Str "link"
+ , Space
+ , Str "to"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "figure"
+ , Space
+ , Str "element:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Str "Pythagorean"
+ , Space
+ , Str "Theorem"
+ , Space
+ , Str "Illustrated"
+ ]
+ ( "#fig01" , "" )
+ , Str "."
+ ]
+ ]
]
, Header
1
@@ -174,4 +201,17 @@ Pandoc
, Plain [ Str "int1" ]
, Plain [ Str "int" ]
, Plain [ Str "int2" ]
+ , Para
+ [ Image
+ ( "fig01" , [] , [] )
+ [ Str "The"
+ , Space
+ , Str "Pythagorean"
+ , Space
+ , Str "Theorem"
+ , Space
+ , Str "Illustrated"
+ ]
+ ( "figures/pythag.png" , "fig:" )
+ ]
]