summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2023-08-18 17:50:59 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2023-08-18 17:50:59 -0700
commit068fce4293eb139f54d4825e1dbdcaf35e34da03 (patch)
treeb8bf3cd3919a87055a13ef54367e9cb9ff4da849 /test
parentbd4de143d076fc46e3c7b6b5e95e421585780639 (diff)
Docx reader: omit "Table NN" from caption.
Closes #9002.
Diffstat (limited to 'test')
-rw-r--r--test/command/9002.docxbin0 -> 12631 bytes
-rw-r--r--test/command/9002.md20
-rw-r--r--test/docx/table_captions_with_field.native10
3 files changed, 24 insertions, 6 deletions
diff --git a/test/command/9002.docx b/test/command/9002.docx
new file mode 100644
index 000000000..4722c53e5
--- /dev/null
+++ b/test/command/9002.docx
Binary files differ
diff --git a/test/command/9002.md b/test/command/9002.md
new file mode 100644
index 000000000..23915dda1
--- /dev/null
+++ b/test/command/9002.md
@@ -0,0 +1,20 @@
+```
+% pandoc command/9002.docx -t html
+^D
+<table>
+<caption><p>This is my table!</p></caption>
+<colgroup>
+<col style="width: 50%" />
+<col style="width: 50%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>a</th>
+<th>b</th>
+</tr>
+</thead>
+<tbody>
+</tbody>
+</table>
+<p>See Table 1 This is my table!</p>
+```
diff --git a/test/docx/table_captions_with_field.native b/test/docx/table_captions_with_field.native
index deb8afc6b..4f81ce477 100644
--- a/test/docx/table_captions_with_field.native
+++ b/test/docx/table_captions_with_field.native
@@ -1,7 +1,6 @@
[Para [Str "See",Space,Str "Table",Space,Str "1."]
-,Para []
-,Table ("",[],[]) (Caption Nothing
- [Para [Str "Table",Space,Str "1"]])
+,Para [Str "Table",Space,Str "1"]
+,Table ("",[],[]) (Caption Nothing [])
[(AlignDefault,ColWidth 0.7605739372523825)
,(AlignDefault,ColWidth 0.11971303137380876)
,(AlignDefault,ColWidth 0.11971303137380876)]
@@ -32,8 +31,7 @@
(TableFoot ("",[],[])
[])
,Header 2 ("section", [], []) []
-,Table ("",[],[]) (Caption Nothing
- [Para [Str "Table",Space,Str "2"]])
+,Table ("",[],[]) (Caption Nothing [])
[(AlignDefault,ColWidth 0.3332963620230701)
,(AlignDefault,ColWidth 0.3332963620230701)
,(AlignDefault,ColWidth 0.3334072759538598)]
@@ -50,5 +48,5 @@
[])]
(TableFoot ("",[],[])
[])
-,Para []
+,Para [Str "Table",Space,Str "2"]
,Para [Str "See",Space,Str "Table",Space,Str "2."]]