Skip to content

Commit

Permalink
Rnmobile/fix whitespace removal (#21469)
Browse files Browse the repository at this point in the history
* Stop whitespace removal

* Only remove spaces on Android.

* Fix lint error.

* Remove JS code as we are not handling whitespace on the native side

* Fix lint error

Co-authored-by: Marko Savic <[email protected]>
  • Loading branch information
SergioEstevao and marecar3 committed Apr 23, 2020
1 parent 8eb5a47 commit 5be5b29
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/rich-text/src/component/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,7 @@ export class RichText extends Component {
*/
getRecord() {
const { selectionStart: start, selectionEnd: end } = this.props;
let { value } = this.props;

// Since we get the text selection from Aztec we need to be in sync with the HTML `value`
// Removing leading white spaces using `trim()` should make sure this is the case.
if ( typeof value === 'string' || value instanceof String ) {
value = value.trimLeft();
}
const { value } = this.props;

const { formats, replacements, text } = this.formatToValue( value );
const { activeFormats } = this.state;
Expand Down

0 comments on commit 5be5b29

Please sign in to comment.