diff --git a/executables/APITests.hs b/executables/APITests.hs
--- a/executables/APITests.hs
+++ b/executables/APITests.hs
@@ -28,3 +28,22 @@
     escaped name = [text|this_could_be_${name}_long_identifier|]
     a = "{\n  indented line\n  indented line\n}"
 
+test_dollar = do
+  assertEqual
+    "function(){\n  function(){\n    {\n      indented line\n      indented line\n    }\n  }\n  return \"$b\"\n}\n"
+    (template a a)
+  assertEqual
+    "this_could_be_$one$_long_identifier\n"
+    (escaped "one")
+  where
+    template a b = 
+      [text|
+        function(){
+          function(){
+            $a
+          }
+          return "$$b"
+        }
+      |]
+    escaped name = [text|this_could_be_$$${name}$$_long_identifier|]
+    a = "{\n  indented line\n  indented line\n}"
diff --git a/library/NeatInterpolation/Parsing.hs b/library/NeatInterpolation/Parsing.hs
--- a/library/NeatInterpolation/Parsing.hs
+++ b/library/NeatInterpolation/Parsing.hs
@@ -3,7 +3,6 @@
 import BasePrelude hiding (try, (<|>), many)
 import Text.Parsec hiding (Line)
 
-
 data Line = 
   Line {lineIndent :: Int, lineContents :: [LineContent]}
   deriving (Show)
@@ -13,16 +12,16 @@
   LineContentIdentifier [Char]
   deriving (Show)
 
-
 parseLines :: [Char] -> Either ParseError [Line]
 parseLines = parse lines "NeatInterpolation.Parsing.parseLines"
   where
     lines = sepBy line newline <* eof
     line = Line <$> countIndent <*> many content
     countIndent = fmap length $ try $ lookAhead $ many $ char ' '
-    content = try identifier <|> contentText
+    content = try escapedDollar <|> try identifier <|> contentText
     identifier = fmap LineContentIdentifier $ 
       char '$' *> (try identifier' <|> between (char '{') (char '}') identifier')
+    escapedDollar = fmap LineContentText $ char '$' *> count 1 (char '$')
     identifier' = many1 (alphaNum <|> char '\'' <|> char '_')
     contentText = do
       text <- manyTill anyChar end
@@ -30,7 +29,8 @@
         then fail "Empty text"
         else return $ LineContentText $ text
       where
-        end = 
+        end =
+          (void $ try $ lookAhead escapedDollar) <|>
           (void $ try $ lookAhead identifier) <|> 
           (void $ try $ lookAhead newline) <|> 
           eof
diff --git a/neat-interpolation.cabal b/neat-interpolation.cabal
--- a/neat-interpolation.cabal
+++ b/neat-interpolation.cabal
@@ -1,7 +1,7 @@
 name:
   neat-interpolation
 version:
-  0.3.1.1
+  0.3.2
 synopsis:
   A quasiquoter for neat and simple multiline text interpolation
 description:
