Fix string interpolation issue

* Using '' to substitute `\n` characters will introduce unwanted
 characters which can be mitigated by using "" inside the String#gsub
 method.