diff --git a/packages/block-library/package.json b/packages/block-library/package.json index f43f8241138cbe..f8c0bfb8d3bb6f 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -18,6 +18,7 @@ }, "main": "build/index.js", "module": "build-module/index.js", + "react-native": "src/index", "dependencies": { "@babel/runtime": "^7.0.0-beta.52", "@wordpress/api-fetch": "file:../api-fetch", diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 7e71aa13d07b69..a1d7a369de0ed4 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -30,8 +30,8 @@ export class RichText extends Component { this.lastEventCount = event.nativeEvent.eventCount; // The following method just cleans up any
tags produced by aztec and replaces them with a br tag // This should be removed on a later version when aztec doesn't return the top tag of the text being edited - const openingTagRegexp = RegExp( '^<' + this.props.tagName + '>', 'gi' ); - const closingTagRegexp = RegExp( '' + this.props.tagName + '>$', 'gi' ); + const openingTagRegexp = RegExp( '^<' + this.props.tagName + '>', 'gim' ); + const closingTagRegexp = RegExp( '' + this.props.tagName + '>$', 'gim' ); const contentWithoutRootTag = event.nativeEvent.text.replace( openingTagRegexp, '' ).replace( closingTagRegexp, '' ); this.lastContent = contentWithoutRootTag;