diff options
| author | Albert Krewinkel <[email protected]> | 2022-01-01 13:35:18 +0100 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2022-01-01 13:44:14 +0100 |
| commit | eae9be3a484b7046a9d8ca4eeca990b6a3719b0c (patch) | |
| tree | f2bf494481e1a215424ded2f1ef427fb8aed3eca /src | |
| parent | e58a5ceed8bb629efbfd670bf162b65b7853ab7f (diff) | |
Org reader: allow trailing spaces after key/value pairs in directives
Ensures that spaces at the end of attribute directives like
`#+ATTR_HTML: :width 100%` (note the trailing spaces) are accepted.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/Org/Blocks.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index 9a689b0e8..9fe68aa4c 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -167,9 +167,8 @@ keyValues = try $ value = skipSpaces *> manyTillChar anyChar endOfValue endOfValue :: Monad m => OrgParser m () - endOfValue = - lookAhead $ (() <$ try (many1 spaceChar <* key)) - <|> () <$ newline + endOfValue = lookAhead (void $ try (many1 spaceChar <* key)) + <|> try (skipSpaces <* lookAhead newline) -- |
