diff --git a/ChangeLog b/ChangeLog
index d0e50c081cbf4ab963237eecdcdd9e7f231c5855..aaf2f19424cd6d08f4b05ecdf4efc7e96755172f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-02-23  Benno Schulenberg  <bensberg@justemail.net>
 	* doc/syntax/*.nanorc - Comment and punctuation tweaks.
+	* doc/syntax/sh.nanorc - Colour $VAR within a "" string
+	but not within a '' string, and do not colour strings
+	within comments.  Fixes bug #29943.
 
 2014-02-23  Benno Schulenberg  <bensberg@justemail.net>
 	* src/text.c (do_undo, do_redo, add_undo) - Make warning
diff --git a/doc/syntax/sh.nanorc b/doc/syntax/sh.nanorc
index f6601057074b90bd7a70f15ebffbe65b6f8a456b..f5922339f98f60dc2ee7b6bee2078be23a87da85 100644
--- a/doc/syntax/sh.nanorc
+++ b/doc/syntax/sh.nanorc
@@ -9,7 +9,8 @@ color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
 color green "-[Ldefgruwx]\>"
 color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
 color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
+color brightyellow ""(\\.|[^"])*""
 icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
+color brightyellow "'(\\.|[^'])*'"
 color cyan "(^|[[:space:]])#.*$"
-color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
 color ,green "[[:space:]]+$"