diff options
| author | John MacFarlane <[email protected]> | 2025-03-29 10:29:41 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-03-29 18:36:18 -0700 |
| commit | 3a0743e815c9af28669828a5df2ccab0eefbc306 (patch) | |
| tree | 2d8f2af6b77f41083a37e98f560164d36d4dfc2e /src | |
| parent | b526c504ea1223e75756de9ede29a4df017ae1a1 (diff) | |
Org reader: don't include newlines in inine code/verbatim.
Convert newlines to spaces as we do in other formats.
Closes #10730.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/Org/Inlines.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Inlines.hs b/src/Text/Pandoc/Readers/Org/Inlines.hs index b5b48257f..b4d732a74 100644 --- a/src/Text/Pandoc/Readers/Org/Inlines.hs +++ b/src/Text/Pandoc/Readers/Org/Inlines.hs @@ -635,11 +635,11 @@ emphasisBetween c = try $ do verbatimBetween :: PandocMonad m => Char -> OrgParser m Text -verbatimBetween c = try $ - emphasisStart c *> - many1TillNOrLessNewlines 1 verbatimChar (emphasisEnd c) +verbatimBetween c = newlinesToSpaces <$> + try (emphasisStart c *> many1TillNOrLessNewlines 1 verbatimChar (emphasisEnd c)) where verbatimChar = noneOf "\n\r" >>= updatePositions + newlinesToSpaces = T.map (\d -> if d == '\n' then ' ' else d) -- | Parses a raw string delimited by @c@ using Org's math rules mathTextBetween :: PandocMonad m |
