aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2014-07-27 15:11:18 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2014-07-29 13:03:01 -0400
commit840108a9c11850089a27a3b5458f8561ab1b6a2e (patch)
treedb96e841d15bec4173db7257dc58b0ef17bdb960 /tests/Tests
parent3eff3782c1cfde8c1cdb4d5461dfb4bf09168e9c (diff)
downloadpandoc-840108a9c11850089a27a3b5458f8561ab1b6a2e.tar.gz
Docx reader: Make metavalues out of styled paragraphs.
This will make paragraphs styled with `Author`, `Title`, `Subtitle`, `Date`, and `Abstract` into pandoc metavalues, rather than text. The implementation only takes those elements from the beginning of the document (ignoring empty paragraphs). Multiple paragraphs in the `Author` style will be made into a metaList, one paragraph per item. Hard linebreaks (shift-return) in the paragraph will be maintained, and can be used for institution, email, etc.
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Readers/Docx.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs
index 7b737f95a..8ad9e08ba 100644
--- a/tests/Tests/Readers/Docx.hs
+++ b/tests/Tests/Readers/Docx.hs
@@ -164,5 +164,20 @@ tests = [ testGroup "inlines"
"docx.track_changes_deletion.docx"
"docx.track_changes_deletion_all.native"
]
+ , testGroup "metadata"
+ [ testCompareWithOpts def{readerStandalone=True}
+ "metadata fields"
+ "docx.metadata.docx"
+ "docx.metadata.native"
+ , testCompareWithOpts def{readerStandalone=True}
+ "linebreak between authors"
+ "docx.metadata_author_linebreak.docx"
+ "docx.metadata_author_linebreak.native"
+ , testCompareWithOpts def{readerStandalone=True}
+ "stop recording metadata with normal text"
+ "docx.metadata_after_normal.docx"
+ "docx.metadata_after_normal.native"
+ ]
+
]