mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-24 17:26:32 +00:00
Muse reader: test metadata parsing
This commit is contained in:
@@ -150,8 +150,7 @@ parseDirective = do
|
||||
key <- many letter
|
||||
space
|
||||
spaces
|
||||
raw <- many $ noneOf "\n"
|
||||
newline
|
||||
raw <- manyTill anyChar eol
|
||||
value <- parseFromString (trimInlinesF . mconcat <$> many inline) raw
|
||||
return (key, value)
|
||||
|
||||
|
||||
@@ -689,4 +689,11 @@ tests =
|
||||
, para "Third"
|
||||
])
|
||||
]
|
||||
, testGroup "Meta"
|
||||
[ "Title" =:
|
||||
"#title Document title" =?>
|
||||
let titleInline = toList $ "Document title"
|
||||
meta = setMeta "title" (MetaInlines titleInline) $ nullMeta
|
||||
in Pandoc meta mempty
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user