Skip to content

Commit

Permalink
fix weird spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
notwaldorf committed Feb 6, 2016
1 parent 7d9e88e commit c458663
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions emoji-translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ function translateWord(word) {
node.innerHTML = word;
}

// Reapply the punctuation.
node.innerHTML = firstSymbol + node.innerHTML + lastSymbol + ' ';
// Reapply the punctuation but only add a bonus space for non-emoji.
node.innerHTML = firstSymbol + node.innerHTML + lastSymbol;
if (emoji == '')
node.innerHTML += ' ';

return node;
}

Expand Down
6 changes: 4 additions & 2 deletions extension/emoji-translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ function translateWord(word) {
node.innerHTML = word;
}

// Reapply the punctuation.
node.innerHTML = firstSymbol + node.innerHTML + lastSymbol + ' ';
// Reapply the punctuation but only add a bonus space for non-emoji.
node.innerHTML = firstSymbol + node.innerHTML + lastSymbol;
if (emoji == '')
node.innerHTML += ' ';
return node;
}

Expand Down

0 comments on commit c458663

Please sign in to comment.