From 465c28d28e1017040a41653edb6248056f178d3b Mon Sep 17 00:00:00 2001 From: Milan Bracke Date: Thu, 24 Jun 2021 09:27:28 +0200 Subject: Docx reader: fix handling of empty fields Some fields only have an instrText and no content, Pandoc didn't understand these, causing other fields to be misunderstood because it seemed like a field was still open when it wasn't. --- test/docx/empty_field.docx | Bin 0 -> 14312 bytes test/docx/empty_field.native | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 test/docx/empty_field.docx create mode 100644 test/docx/empty_field.native (limited to 'test/docx') diff --git a/test/docx/empty_field.docx b/test/docx/empty_field.docx new file mode 100644 index 000000000..fb3830b0d Binary files /dev/null and b/test/docx/empty_field.docx differ diff --git a/test/docx/empty_field.native b/test/docx/empty_field.native new file mode 100644 index 000000000..18d892454 --- /dev/null +++ b/test/docx/empty_field.native @@ -0,0 +1,7 @@ +[Para + [Str "\24076\26395\28145\20837\20102\35299\30340\35835\32773\21487\20197\21435\30475David",Space,Str "French",Space,Str "Belding\21644Kevin",Space,Str "J.",Space,Str "Mitchell\30340" + ,Link ("",[],[]) [Str "Foundations",Space,Str "of",Space,Str "Analysis,",Space,Str "2nd",Space,Str "Edition"] ("https://books.google.com/books?id=sp_Zcb9ot90C&lpg=PR4&hl=zh-CN&pg=PA19#v=onepage&q&f=true",""),Str ",\21487\20174\&19\39029\30475\36215\65292\25110D.C.",Space,Str "Goldrei\30340",Space + ,Link ("",[],[]) [Str "Classic",Space,Str "Set",Space,Str "Theory:",Space,Str "For",Space,Str "Guided",Space,Str "Independent",Space,Str "Study"] ("https://books.google.ae/books?id=dlc0DwAAQBAJ&lpg=PT29&hl=zh-CN&pg=PT26#v=onepage&q&f=true","") + ,Str "\65292\20174\31532\20108\31456\30475\36215\65292\38405\35835\26102\35201\27880\24847\26412\25991\19982\36825\20123\20070\25152\19981\21516\30340\26159\24182\27809\26377\25226\23454\25968\30475\20316\26159\26377\29702\25968\38598\30340\20998\21106\12290"] +,Para [Str "Index:"] +,Para [Str "French,",Space,Str "1"]] -- cgit v1.2.3