Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Commit

Permalink
fix #167 changed sub to substr
Browse files Browse the repository at this point in the history
  • Loading branch information
jackd1 authored and Joshua-S committed Mar 6, 2014
1 parent 5504283 commit c0173a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/firetext.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function cleanForPreview(text, documentType) {
return textTruncated;
} else {
var htmlOfTextWanted = rDynamic.exec(text)[0];
var remainingHTML = text.sub(htmlOfTextWanted.length);
var remainingHTML = text.substr(htmlOfTextWanted.length);
var firstNewTagAfterHTMLOfTextWanted = remainingHTML.search(/<[a-zA-Z]/);
if(firstNewTagAfterHTMLOfTextWanted != -1) {
remainingHTML = remainingHTML.substr(0, firstNewTagAfterHTMLOfTextWanted);
Expand Down

0 comments on commit c0173a4

Please sign in to comment.