Skip to content
Snippets Groups Projects
Commit 9e4aac1d authored by Rhys Arkins's avatar Rhys Arkins
Browse files

Fix replace bug

parent 32a9993b
Branches
No related tags found
No related merge requests found
...@@ -41,5 +41,5 @@ function matchAt(content, index, match) { ...@@ -41,5 +41,5 @@ function matchAt(content, index, match) {
// Replace oldString with newString at location index of content // Replace oldString with newString at location index of content
function replaceAt(content, index, oldString, newString) { function replaceAt(content, index, oldString, newString) {
return content.substr(0, index) + newString + content.substr(index, oldString.length); return content.substr(0, index) + newString + content.substr(index + oldString.length);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment