@@ -422,7 +422,16 @@ verseBlock blockType = try $ do
422 ignHeaders
422 ignHeaders
423 content <- rawBlockContent blockType
423 content <- rawBlockContent blockType
424 fmap B.para . mconcat . intersperse (pure B.linebreak)
424 fmap B.para . mconcat . intersperse (pure B.linebreak)
425+ <$> mapM parseVerseLine (lines content)
427+ -- replace initial spaces with nonbreaking spaces to preserve
428+ -- indentation, parse the rest as normal inline
429+ parseVerseLine :: String -> OrgParser (F Inlines)
430+ parseVerseLine cs = do
431+ let (initialSpaces, indentedLine) = span isSpace cs
432+ let nbspIndent = B.str $ map (const '\160') initialSpaces
425− <$> mapM (parseFromString inlines) (map (++ "\n") . lines $ content)
433+ line <- parseFromString inlines (indentedLine ++ "\n")
434+ return (pure nbspIndent <> line)
427-- | Read a code block and the associated results block if present. Which of
436-- | Read a code block and the associated results block if present. Which of
428-- boths blocks is included in the output is determined using the "exports"
437-- boths blocks is included in the output is determined using the "exports"