@@ -399,11 +399,11 @@ exportsResults :: [(String, String)] -> Bool
399exportsResults attrs = ("rundoc-exports", "results") `elem` attrs
399exportsResults attrs = ("rundoc-exports", "results") `elem` attrs
400 || ("rundoc-exports", "both") `elem` attrs
400 || ("rundoc-exports", "both") `elem` attrs
402−followingResultsBlock :: OrgParser (Maybe String)
402+followingResultsBlock :: OrgParser (Maybe (F Blocks))
403followingResultsBlock =
403followingResultsBlock =
404 optionMaybe (try $ blanklines *> stringAnyCase "#+RESULTS:"
404 optionMaybe (try $ blanklines *> stringAnyCase "#+RESULTS:"
405 *> blankline
405 *> blankline
406− *> (unlines <$> many1 exampleLine))
406+ *> block)
408codeBlock :: BlockProperties -> OrgParser (F Blocks)
408codeBlock :: BlockProperties -> OrgParser (F Blocks)
409codeBlock blkProp = do
409codeBlock blkProp = do
@@ -418,7 +418,7 @@ codeBlock blkProp = do
418 labelledBlck <- maybe (pure codeBlck)
418 labelledBlck <- maybe (pure codeBlck)
419 (labelDiv codeBlck)
419 (labelDiv codeBlck)
420 <$> lookupInlinesAttr "caption"
420 <$> lookupInlinesAttr "caption"
421− let resultBlck = pure $ maybe mempty (exampleCode) resultsContent
421+ let resultBlck = fromMaybe mempty resultsContent
422 return $ (if includeCode then labelledBlck else mempty)
422 return $ (if includeCode then labelledBlck else mempty)
423 <> (if includeResults then resultBlck else mempty)
423 <> (if includeResults then resultBlck else mempty)