fix FileProcessor.prototype.replaceBlocks bug

In FileProcessor.prototype.replaceBlocks replacement, only replace the
first match $(special character).