aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-12-05 10:46:24 +0100
committerJohn MacFarlane <[email protected]>2025-12-05 10:46:24 +0100
commit41b14dc891b188e9daeeb322dab80e5fb4be0cd3 (patch)
tree00d739137e8955e45b98a19106b1f34eefbb0340 /src
parent5e72d6e1436b53fcb21927e605a6c97302844b79 (diff)
RST reader: fix definition lists where term ends with `-`.
This reverts some old code giving special treatment to lines ending in hyphens; I don't understand why it was there, because rst2html does not seem to do this. Closes #11323.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/RST.hs8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index 5d5e176ee..9cec47c1f 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -1520,20 +1520,12 @@ inlineContent = choice [ whitespace
, str
, endline
, smart
- , hyphens
, escapedChar
, symbol ] <?> "inline content"
parseInlineFromText :: PandocMonad m => Text -> RSTParser m Inlines
parseInlineFromText = parseFromString' (trimInlines . mconcat <$> many inline)
-hyphens :: Monad m => RSTParser m Inlines
-hyphens = do
- result <- many1Char (char '-')
- optional endline
- -- don't want to treat endline after hyphen or dash as a space
- return $ B.str result
-
escapedChar :: Monad m => RSTParser m Inlines
escapedChar = do c <- escaped anyChar
if c == ' ' || c == '\n' || c == '\r'