Let host insert the newline when replacing characters
Use camel-case for nested function.
Merge pull request #1246 from ricksladkey/fixes-replace-with-newline

Let host insert the newline when replacing characters