scripths 0.1.0.0 → 0.1.0.1
raw patch · 4 files changed
+13/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- app/Main.hs +1/−1
- scripths.cabal +1/−1
- src/ScriptHs/Markdown.hs +7/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for scripths +## 0.1.0.1 -- 2026-02-24++* Fix code new ine behaviour for code fencing.+ ## 0.1.0.0 -- YYYY-mm-dd * First version. Released on an unsuspecting world.
app/Main.hs view
@@ -1,6 +1,6 @@ module Main where -import Data.List ( isPrefixOf )+import Data.List (isPrefixOf) import qualified Data.Text.IO as TIO import System.Environment (getArgs, getProgName) import System.Exit (exitFailure)
scripths.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: scripths-version: 0.1.0.0+version: 0.1.0.1 synopsis: GHCi scripts for standalone execution and Markdown documentation. description: GHCi scripts for standalone execution (with dependency resolution) and Markdown documentation (produces inline output). homepage: https://www.datahaskell.org/
src/ScriptHs/Markdown.hs view
@@ -35,7 +35,13 @@ fence = "```" fenceCodeSegment :: Text -> Text -> Text-fenceCodeSegment lang output = "\n" <> fence <> lang <> "\n" <> output <> fence <> "\n"+fenceCodeSegment lang output+ | T.null output = ""+ | otherwise = T.unlines ["", fence <> lang, ensureNewLine output, fence, ""]+ where+ ensureNewLine t+ | "\n" `T.isSuffixOf` t = t+ | otherwise = T.snoc t '\n' reassemble :: [Segment] -> Text reassemble = T.concat . map renderSegment