Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
no suggestions for punctuation and "£@¡"-like patterns
  • Loading branch information
Kira-D authored and sushain97 committed Aug 29, 2016
commit 80a60f9c0cebf81a2061b005001b34efa4dfbd8b
4 changes: 2 additions & 2 deletions assets/js/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ function translateText() {
var placeholder = dynamicLocalizations['Suggest_Placeholder'];
$('#suggestedWordInput').attr('placeholder', placeholder);
$('#translatedText').html(
$('#translatedText').html().replace(/(\*|\@|\#)(\S+)/g, '<span class="wordSuggestPop text-danger" title="' + localizedTitle + '">$2</span>'));
$('#translatedText').html().replace(/(^|\W|\d)(\*|\@|\#)(\w+)/g, '$1<span class="wordSuggestPop text-danger" title="' + localizedTitle + '">$3</span>'));
}

$('#translatedTextClone').html(
Expand All @@ -619,7 +619,7 @@ function translateText() {
$(this).attr('id', 'wordGettingSuggested');

$('#translatedTextClone').html(
$('#translatedTextClone').html().replace(/(\*|\@|\#)(\S+)/g, '<span class="wordSuggestPopInline text-danger" title="' + localizedTitle + '">$2</span>'));
$('#translatedTextClone').html().replace(/(^|\W|\d)(\*|\@|\#)(\w+)/g, '$1<span class="wordSuggestPopInline text-danger" title="' + localizedTitle + '">$3</span>'));

$('.wordSuggestPopInline').click(function() {
$('.wordSuggestPop').removeAttr('id');
Expand Down