gearheads
/
mastodon
Archived
2
0
Fork 0

Merge pull request #655 from marrus-sh/mastodon-frontend-character-count

Fixes #263; makes JavaScript's character counting the same as Ruby's
gh/stable
Eugen 2017-02-27 15:51:57 +01:00 committed by GitHub
commit 5a7590d94c
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ const CharacterCounter = React.createClass({
mixins: [PureRenderMixin],
render () {
const diff = this.props.max - this.props.text.length;
const diff = this.props.max - this.props.text.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length;
return (
<span style={{ fontSize: '16px', cursor: 'default' }}>