aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Docx/Fields.hs20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Fields.hs b/src/Text/Pandoc/Readers/Docx/Fields.hs
index 5707197c0..88c429ddd 100644
--- a/src/Text/Pandoc/Readers/Docx/Fields.hs
+++ b/src/Text/Pandoc/Readers/Docx/Fields.hs
@@ -28,6 +28,8 @@ data FieldInfo = HyperlinkField URL
| PagerefField Anchor Bool
| ZoteroItem T.Text
| ZoteroBibliography
+ | EndNoteCite T.Text
+ | EndNoteRefList
| UnknownField
deriving (Show)
@@ -49,10 +51,10 @@ addIn = do
spaces
string "ADDIN"
spaces
- try zoteroItem <|> zoteroBibliography
+ zoteroItem <|> zoteroBibliography <|> endnoteCite <|> endnoteRefList
zoteroItem :: Parser FieldInfo
-zoteroItem = do
+zoteroItem = try $ do
string "ZOTERO_ITEM"
spaces
string "CSL_CITATION"
@@ -60,10 +62,22 @@ zoteroItem = do
ZoteroItem <$> getInput
zoteroBibliography :: Parser FieldInfo
-zoteroBibliography = do
+zoteroBibliography = try $ do
string "ZOTERO_BIBL"
return ZoteroBibliography
+endnoteCite :: Parser FieldInfo
+endnoteCite = try $ do
+ string "EN.CITE"
+ spaces
+ EndNoteCite <$> getInput
+
+endnoteRefList :: Parser FieldInfo
+endnoteRefList = try $ do
+ string "EN.REFLIST"
+ return EndNoteRefList
+
+
escapedQuote :: Parser T.Text
escapedQuote = string "\\\"" $> "\\\""