summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Docx/Fields.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Fields.hs b/src/Text/Pandoc/Readers/Docx/Fields.hs
index 5f090b6be..4d7bc3757 100644
--- a/src/Text/Pandoc/Readers/Docx/Fields.hs
+++ b/src/Text/Pandoc/Readers/Docx/Fields.hs
@@ -26,6 +26,7 @@ type Anchor = T.Text
data FieldInfo = HyperlinkField URL
-- The boolean indicates whether the field is a hyperlink.
| PagerefField Anchor Bool
+ | ZoteroField T.Text
| UnknownField
deriving (Show)
@@ -38,8 +39,21 @@ fieldInfo =
<|>
try ((uncurry PagerefField) <$> pageref)
<|>
+ try (ZoteroField <$> zotero)
+ <|>
return UnknownField
+zotero :: Parser T.Text
+zotero = do
+ spaces
+ string "ADDIN"
+ spaces
+ string "ZOTERO_ITEM"
+ spaces
+ string "CSL_CITATION"
+ spaces
+ getInput
+
escapedQuote :: Parser T.Text
escapedQuote = string "\\\"" $> "\\\""