diff --git a/extras/pre-commit b/extras/pre-commit
index d1208efc231783646b68e62ef178350b0601fcf9..b1e0d7d579beb789aeea361c206d0a7c6c452675 100755
--- a/extras/pre-commit
+++ b/extras/pre-commit
@@ -1,15 +1,16 @@
 #!/bin/sh
 
-# Last modified: Thu 26 Jun 14
+# Last modified: Thu 03 Jul 14
 
 # global settings
 my_git_hook_repo="extras/pre-commit"
 my_abortmsg="aborting commit."
 my_min_git_version="1.7.5.1"
-### my_wel: whitespace check exclude list
-###         .pdf         - PDF files
-###         .pdb         - PDB files
-my_wel="\\\.pdf \\\.pdb"
+### my_wel: W_hitespace check E_xclude L_ist
+###         .*.pdf         - PDF files
+###         .*.pdb         - PDB files
+###         ^doc/html/.*   - Everything in html/ is generated
+my_wel=".*\\\.pdf .*\\\.pdb ^doc/html/.*"
 
 
 # check for right version of git
@@ -100,7 +101,7 @@ echo "[ Checking for trailing whitespaces ]"
 my_rexp=
 for i in $my_wel
 do
-    my_rexp="${my_rexp}|.*${i}:[[:digit:]]+:"
+    my_rexp="${my_rexp}|${i}:[[:digit:]]+:"
 done
 
 if git rev-parse --verify HEAD 2>&1 > /dev/null; then