0
0
Fork 0

Improve RTL detection (#3682)

- Use plaintext
- Strip out URLs
- Strip out mentions
- Strip out hashtags
- Strip out whitespace from "overall" count
- Consistent between JS and Ruby
This commit is contained in:
Eugen Rochko 2017-06-10 15:06:50 +02:00 committed by GitHub
parent 4919b89ab8
commit 8015fd7600
5 changed files with 26 additions and 5 deletions

View file

@ -100,7 +100,7 @@ class StatusContent extends React.PureComponent {
const spoilerContent = { __html: emojify(escapeTextContentForBrowser(status.get('spoiler_text', ''))) };
const directionStyle = { direction: 'ltr' };
if (isRtl(status.get('content'))) {
if (isRtl(status.get('search_index'))) {
directionStyle.direction = 'rtl';
}