Skip to content

Commit

Permalink
Merge pull request #1 from LemonAndroid/fix/pivot-gt-22
Browse files Browse the repository at this point in the history
Don't add tailing characters for words > 22
  • Loading branch information
eZii-jester-data authored Sep 4, 2018
2 parents eb3b3e5 + 8eb42c9 commit cb1e58d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/js/spray-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ function pivot(word){

else{

word = '.......' + word;

var tail = 22 - (word.length + 7);
word = '.......' + word + ('.'.repeat(tail));
if(tail > 0) {
word + ('.'.repeat(tail));
}

var start = word.slice(0, word.length/2);
var end = word.slice(word.length/2, word.length);
Expand Down

0 comments on commit cb1e58d

Please sign in to comment.