diff --git a/markdown-unlit.cabal b/markdown-unlit.cabal
--- a/markdown-unlit.cabal
+++ b/markdown-unlit.cabal
@@ -3,7 +3,7 @@
 -- see: https://github.com/sol/hpack
 
 name:             markdown-unlit
-version:          0.3.1
+version:          0.4.0
 synopsis:         Literate Haskell support for Markdown
 category:         Development
 homepage:         https://github.com/sol/markdown-unlit#readme
diff --git a/src/Text/Markdown/Unlit.hs b/src/Text/Markdown/Unlit.hs
--- a/src/Text/Markdown/Unlit.hs
+++ b/src/Text/Markdown/Unlit.hs
@@ -21,6 +21,12 @@
 import           System.Exit
 import           System.Environment
 
+fenceChars :: [Char]
+fenceChars = ['`', '~']
+
+fences :: [String]
+fences = map (replicate 3) fenceChars
+
 -- | Program entry point.
 run :: [String] -> IO ()
 run args =
@@ -115,13 +121,15 @@
         (cb, rest) -> (CodeBlock (parseClasses fence) (map (drop indent . snd) cb) n, drop 1 rest)
 
     isFence :: Line -> Bool
-    isFence = isPrefixOf "~~~" . dropWhile isSpace . snd
+    isFence = p . dropWhile isSpace . snd
+      where
+        p :: String -> Bool
+        p line = any (`isPrefixOf` line) fences
 
 parseClasses :: String -> [String]
-parseClasses xs = case dropWhile isSpace . dropWhile (== '~') . dropWhile isSpace $ xs of
-  '{':ys -> words . replace '.' ' ' . takeWhile (/= '}') $ ys
-  _      -> []
-
+parseClasses xs = words . replace '.' ' ' $ case dropWhile isSpace . dropWhile (`elem` fenceChars) . dropWhile isSpace $ xs of
+  '{':ys -> takeWhile (/= '}') ys
+  ys -> ys
 
 replace :: Char -> Char -> String -> String
 replace x sub = map f
diff --git a/test/Text/Markdown/UnlitSpec.hs b/test/Text/Markdown/UnlitSpec.hs
--- a/test/Text/Markdown/UnlitSpec.hs
+++ b/test/Text/Markdown/UnlitSpec.hs
@@ -186,6 +186,14 @@
         "some other text"
       `shouldBe` [["some", "code"]]
 
+    it "accepts backticks as fence" $ do
+      parse . build $ do
+        "``` {.haskell .ignore}"
+        "some"
+        "code"
+        "```"
+      `shouldBe` [CodeBlock ["haskell", "ignore"] ["some", "code"] 2]
+
     it "parses an indented code block" $ do
       map codeBlockContent . parse . build $ do
         "1. some text"
@@ -237,3 +245,10 @@
 
     it "treats dots as whitespace" $ do
       parseClasses "~~~ {foo.bar. ..}" `shouldBe` ["foo", "bar"]
+
+    context "without {...}" $ do
+      it "accepts single class" $ do
+        parseClasses "```haskell" `shouldBe` ["haskell"]
+
+      it "accepts multiple classes" $ do
+        parseClasses "```.haskell .ignore" `shouldBe` ["haskell", "ignore"]
