patat 0.8.6.0 → 0.8.6.1
raw patch · 3 files changed
+10/−5 lines, 3 files
Files
- CHANGELOG.md +5/−0
- lib/Patat/Eval.hs +4/−4
- patat.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Changelog +- 0.8.6.1 (2020-09-18)+ * Fix issue with laziness for evaluted code blocks, they should only be+ evaluated when we actually want to show them+ * Bump stack resolver to `lts-16.9`+ - 0.8.6.0 (2020-09-11) * Allow evaluating code blocks (see README for more info) * Refactor implementation of fragments
lib/Patat/Eval.hs view
@@ -61,10 +61,10 @@ -------------------------------------------------------------------------------- evalBlock :: EvalSettingsMap -> Pandoc.Block -> IO [Instruction Pandoc.Block] evalBlock settings orig@(Pandoc.CodeBlock attr@(_, classes, _) txt)- | [s@EvalSettings {..}] <- lookupSettings classes settings =- unsafeInterleaveIO $ do- EvalResult {..} <- evalCode s txt- let out = case erExitCode of+ | [s@EvalSettings {..}] <- lookupSettings classes settings = do+ out <- unsafeInterleaveIO $ do+ EvalResult {..} <- evalCode s txt+ pure $ case erExitCode of ExitSuccess -> erStdout ExitFailure i -> evalCommand <> ": exit code " <> T.pack (show i) <> "\n" <>
patat.cabal view
@@ -1,5 +1,5 @@ Name: patat-Version: 0.8.6.0+Version: 0.8.6.1 Synopsis: Terminal-based presentations using Pandoc Description: Terminal-based presentations using Pandoc. License: GPL-2