patat 0.12.0.0 → 0.12.0.1
raw patch · 4 files changed
+13/−7 lines, 4 filesdep ~pandocPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: pandoc
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- lib/Data/Char/WCWidth/Extended.hs +1/−1
- lib/Patat/Presentation/Display/CodeBlock.hs +3/−2
- patat.cabal +4/−4
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Changelog +## 0.12.0.1 (2024-09-28)++ * Fix width of code blocks when using wide characters (#171)+ * Bump `pandoc` upper bound to 3.3.+ ## 0.12.0.0 (2024-02-27) * Render tabs in code blocks by expanding them to spaces. The amount of
lib/Data/Char/WCWidth/Extended.hs view
@@ -3,7 +3,7 @@ , wcstrwidth ) where -import Data.Char.WCWidth+import Data.Char.WCWidth wcstrwidth :: String -> Int wcstrwidth = sum . map wcwidth
lib/Patat/Presentation/Display/CodeBlock.hs view
@@ -8,7 +8,7 @@ ---------------------------------------------------------------------------------import Data.Char.WCWidth (wcwidth)+import Data.Char.WCWidth.Extended (wcstrwidth, wcwidth) import Data.Maybe (mapMaybe) import qualified Data.Text as T import Patat.Presentation.Display.Internal@@ -88,7 +88,8 @@ (PP.text str) sourceLineLength :: Skylighting.SourceLine -> Int- sourceLineLength line = sum [T.length str | (_, str) <- line]+ sourceLineLength line =+ sum [wcstrwidth (T.unpack str) | (_, str) <- line] blockWidth :: Int blockWidth = foldr max 0 (map sourceLineLength sourceLines)
patat.cabal view
@@ -1,5 +1,5 @@ Name: patat-Version: 0.12.0.0+Version: 0.12.0.1 Synopsis: Terminal-based presentations using Pandoc Description: Terminal-based presentations using Pandoc. License: GPL-2@@ -45,7 +45,7 @@ filepath >= 1.4 && < 1.6, mtl >= 2.2 && < 2.4, optparse-applicative >= 0.16 && < 0.19,- pandoc >= 3.1 && < 3.2,+ pandoc >= 3.1 && < 3.3, pandoc-types >= 1.23 && < 1.24, process >= 1.6 && < 1.7, random >= 1.2 && < 1.3,@@ -133,7 +133,7 @@ containers >= 0.6 && < 0.8, doctemplates >= 0.8 && < 0.12, mtl >= 2.2 && < 2.4,- pandoc >= 3.1 && < 3.2,+ pandoc >= 3.1 && < 3.3, text >= 1.2 && < 2.2, time >= 1.6 && < 1.13 @@ -154,7 +154,7 @@ ansi-terminal >= 0.6 && < 1.1, base >= 4.8 && < 5, directory >= 1.2 && < 1.4,- pandoc >= 3.1 && < 3.2,+ pandoc >= 3.1 && < 3.3, tasty >= 1.2 && < 1.6, tasty-hunit >= 0.10 && < 0.11, tasty-quickcheck >= 0.10 && < 0.11,