yamlBsToRefs: allow multiple YAML documents.
Some people use `---` as the end delimiter in YAML bibliography files, which causes the `yaml` library to emit an error unless we explicitly allow multiple YAML documents (and just consider the first). In T.P.Readers.Metadata
This commit is contained in:
parent
eeafc3a2ea
commit
3f595659a3
1 changed files with 2 additions and 2 deletions
|
@ -56,8 +56,8 @@ yamlBsToRefs :: (PandocMonad m, HasLastStrPosition st)
|
||||||
-> B.ByteString
|
-> B.ByteString
|
||||||
-> ParserT Sources st m (Future st [MetaValue])
|
-> ParserT Sources st m (Future st [MetaValue])
|
||||||
yamlBsToRefs pMetaValue idpred bstr =
|
yamlBsToRefs pMetaValue idpred bstr =
|
||||||
case Yaml.decodeEither' bstr of
|
case Yaml.decodeAllEither' bstr of
|
||||||
Right (Object m) -> do
|
Right (Object m : _) -> do
|
||||||
let isSelected (String t) = idpred t
|
let isSelected (String t) = idpred t
|
||||||
isSelected _ = False
|
isSelected _ = False
|
||||||
let hasSelectedId (Object o) =
|
let hasSelectedId (Object o) =
|
||||||
|
|
Loading…
Reference in a new issue