-
Notifications
You must be signed in to change notification settings - Fork 94
Context size fixed #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
assets/js/translator.js
Outdated
| } | ||
|
|
||
| $('#translatedTextClone').html($('#translatedText').attr('pristineText')); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces not allowed no-trailing-spaces
assets/js/translator.js
Outdated
| var cleanMarkedText = | ||
| $("#translatedText").html().replace(/<span[^>]*id="wordGettingSuggested"[^>]*>/g, mark).replace(/<[/]?span[^>]*>/g, ''); | ||
| var splittedText = cleanMarkedText.split(' '); | ||
| var targetIndex = splittedText.indexOf(mark + fromWord); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces not allowed no-trailing-spaces
| function getContext(fromWord, wrapLength) { | ||
| var mark = 'MEGAWORD!'; | ||
| var cleanMarkedText = | ||
| $("#translatedText").html().replace(/<span[^>]*id="wordGettingSuggested"[^>]*>/g, mark).replace(/<[/]?span[^>]*>/g, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings must use singlequote quotes
Expected line break before .replace newline-per-chained-call
assets/js/translator.js
Outdated
|
|
||
| function getContext(fromWord, wrapLength) { | ||
| var mark = 'MEGAWORD!'; | ||
| var cleanMarkedText = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces not allowed no-trailing-spaces
| var mark = 'MEGAWORD!'; | ||
| var cleanMarkedText = | ||
| // eslint-disable-next-line id-blacklist | ||
| $("#translatedText").html().replace(/<span[^>]*id="wordGettingSuggested"[^>]*>/g, mark).replace(/<[/]?span[^>]*>/g, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings must use singlequote quotes
Expected line break before .replace newline-per-chained-call
assets/js/translator.js
Outdated
| var wordCount = splittedText.length; | ||
| for(var i = 0; i < wordCount && targetIndex === -1; i++) { | ||
| if(splittedText[i].indexOf(markedWord) !== -1) { | ||
| targetIndex = i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 4 space characters but found 0 indent
assets/js/translator.js
Outdated
| var targetIndex = -1; | ||
| var wordCount = splittedText.length; | ||
| for(var i = 0; i < wordCount && targetIndex === -1; i++) { | ||
| if(splittedText[i].indexOf(markedWord) !== -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 4 space characters but found 0 indent
assets/js/translator.js
Outdated
| var splittedText = cleanMarkedText.replace(/\s+/g, ' ').split(' '); | ||
| var targetIndex = -1; | ||
| var wordCount = splittedText.length; | ||
| for(var i = 0; i < wordCount && targetIndex === -1; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 4 space characters but found 0 indent
assets/js/translator.js
Outdated
| /* eslint-enable */ | ||
| var splittedText = cleanMarkedText.replace(/\s+/g, ' ').split(' '); | ||
| var targetIndex = -1; | ||
| var wordCount = splittedText.length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 4 space characters but found 0 indent
assets/js/translator.js
Outdated
| $("#translatedText").html().replace(/<span[^>]*id="wordGettingSuggested"[^>]*>/g, mark).replace(/<[/]?span[^>]*>/g, ''); | ||
| /* eslint-enable */ | ||
| var splittedText = cleanMarkedText.replace(/\s+/g, ' ').split(' '); | ||
| var targetIndex = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 4 space characters but found 0 indent
assets/js/translator.js
Outdated
|
|
||
| function getContext(fromWord, wrapLength) { | ||
| var mark = 'MEGAWORD!'; | ||
| var markedWord = mark + fromWord; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 4 space characters but found 0 indent
assets/js/translator.js
Outdated
| for(var i = 0; i < wordCount && targetIndex === -1; i++) { | ||
| if(splittedText[i].indexOf(markedWord) !== -1) { | ||
| targetIndex = i; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixed spaces and tabs no-mixed-spaces-and-tabs
Expected indentation of 8 space characters but found 0 indent
|
@shardulc I think this PR needs to be de-conflicted and merged in as well for suggestions. |
No description provided.