diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Metadata.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs index b9a8653d5..9bf96f3c4 100644 --- a/src/Text/Pandoc/Readers/Metadata.hs +++ b/src/Text/Pandoc/Readers/Metadata.hs @@ -112,13 +112,16 @@ normalizeMetaValue pMetaValue x = -- Note: a standard quoted or unquoted YAML value will -- not end in a newline, but a "block" set off with -- `|` or `>` will. - if "\n" `T.isSuffixOf` x + if "\n" `T.isSuffixOf` (T.dropWhileEnd isSpaceChar x) -- see #6823 then parseFromString' pMetaValue (x <> "\n") else parseFromString' asInlines x where asInlines = fmap b2i <$> pMetaValue b2i (MetaBlocks [Plain ils]) = MetaInlines ils b2i (MetaBlocks [Para ils]) = MetaInlines ils b2i bs = bs + isSpaceChar ' ' = True + isSpaceChar '\t' = True + isSpaceChar _ = False checkBoolean :: Text -> Maybe Bool checkBoolean t |