diff --git a/src/Yi/Lexer/BasicTemplate.x b/src/Yi/Lexer/BasicTemplate.x
new file mode 100644
--- /dev/null
+++ b/src/Yi/Lexer/BasicTemplate.x
@@ -0,0 +1,37 @@
+-- -*- haskell -*-
+{
+#define NO_ALEX_CONTEXTS
+{-# OPTIONS -w  #-}
+module Yi.Lexer.BasicTemplate
+  ( initState, alexScanToken )
+where
+import Yi.Lexer.Alex hiding (tokenToStyle)
+import Yi.Style
+  ( Style             ( .. )
+  , StyleName
+  )
+import qualified Yi.Style as Style
+}
+
+main :-
+
+<0>
+{
+    $white
+        { c Style.defaultStyle }
+    .
+        { c Style.defaultStyle }
+}
+
+{
+data HlState
+
+stateToInit _ = 0
+
+initState :: HlState
+initState = undefined
+
+type Token = StyleName
+#include "common.hsinc"
+}
+
diff --git a/src/Yi/Lexer/Python.x b/src/Yi/Lexer/Python.x
--- a/src/Yi/Lexer/Python.x
+++ b/src/Yi/Lexer/Python.x
@@ -150,12 +150,16 @@
 }
 
 <doubledoc> {
-  \" \" \"                                      { m (const Base) stringStyle }
+  \"\"\"                                        { m (const Base) stringStyle }
+  $white+                                       ; -- whitespace
+  [^\"]+                                        { c stringStyle }
   .                                             { c stringStyle }
 }
 
 <singledoc> {
-  \' \' \'                                      { m (const Base) stringStyle }
+  \'\'\'                                        { m (const Base) stringStyle }
+  $white+                                       ; -- whitespace
+  [^\']+                                        { c stringStyle }
   .                                             { c stringStyle }
 }
 
diff --git a/yi-misc-modes.cabal b/yi-misc-modes.cabal
--- a/yi-misc-modes.cabal
+++ b/yi-misc-modes.cabal
@@ -1,9 +1,5 @@
--- This file has been generated from package.yaml by hpack version 0.17.1.
---
--- see: https://github.com/sol/hpack
-
 name:           yi-misc-modes
-version:        0.16.0
+version:        0.17.0
 synopsis:       Yi editor miscellaneous modes
 category:       Yi
 homepage:       https://github.com/yi-editor/yi#readme
@@ -67,5 +63,6 @@
       Yi.Lexer.Whitespace
       Yi.Syntax.Latex
   other-modules:
+      Yi.Lexer.BasicTemplate
       Paths_yi_misc_modes
   default-language: Haskell2010
