diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/lib/Data/Char/WCWidth/Extended.hs b/lib/Data/Char/WCWidth/Extended.hs
--- a/lib/Data/Char/WCWidth/Extended.hs
+++ b/lib/Data/Char/WCWidth/Extended.hs
@@ -3,7 +3,7 @@
     , wcstrwidth
     ) where
 
-import Data.Char.WCWidth
+import           Data.Char.WCWidth
 
 wcstrwidth :: String -> Int
 wcstrwidth = sum . map wcwidth
diff --git a/lib/Patat/Presentation/Display/CodeBlock.hs b/lib/Patat/Presentation/Display/CodeBlock.hs
--- a/lib/Patat/Presentation/Display/CodeBlock.hs
+++ b/lib/Patat/Presentation/Display/CodeBlock.hs
@@ -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)
diff --git a/patat.cabal b/patat.cabal
--- a/patat.cabal
+++ b/patat.cabal
@@ -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,
