mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Merge pull request #655 from marrus-sh/mastodon-frontend-character-count
Fixes #263; makes JavaScript's character counting the same as Ruby's
This commit is contained in:
commit
5a7590d94c
@ -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' }}>
|
||||
|
Loading…
Reference in New Issue
Block a user