From 75df1042157e271398e880e64ce95bd83c5d2193 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 29 Aug 2016 14:10:57 +0200 Subject: Org reader: give precedence to later meta lines The last meta-line of any given type is the significant line. Previously the value of the first line was kept, even if more lines of the same type were encounterd. --- tests/Tests/Readers/Org.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/Tests/Readers/Org.hs') diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 844266401..5bb291d45 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -496,6 +496,14 @@ tests = ] =?> (mempty::Blocks) + , "later meta definitions take precedence" =: + unlines [ "#+AUTHOR: this will not be used" + , "#+author: Max" + ] =?> + let author = MetaInlines [Str "Max"] + meta = setMeta "author" (MetaList [author]) $ nullMeta + in Pandoc meta mempty + , "Logbook drawer" =: unlines [ " :LogBook:" , " - State \"DONE\" from \"TODO\" [2014-03-03 Mon 11:00]" -- cgit v1.2.3