@expensify/react-native-live-markdown 0.1.106 → 0.1.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,14 @@
|
|
|
27
27
|
{
|
|
28
28
|
RCTMarkdownUtils *markdownUtils = [self getMarkdownUtils];
|
|
29
29
|
if (markdownUtils != nil) {
|
|
30
|
-
|
|
30
|
+
// Emoji characters are automatically assigned an AppleColorEmoji NSFont and the original font is moved to NSOriginalFont
|
|
31
|
+
// We need to remove these attributes before comparison
|
|
32
|
+
NSMutableAttributedString *newTextCopy = [newText mutableCopy];
|
|
33
|
+
NSMutableAttributedString *oldTextCopy = [oldText mutableCopy];
|
|
34
|
+
[newTextCopy removeAttribute:@"NSFont" range:NSMakeRange(0, newTextCopy.length)];
|
|
35
|
+
[oldTextCopy removeAttribute:@"NSFont" range:NSMakeRange(0, oldTextCopy.length)];
|
|
36
|
+
[oldTextCopy removeAttribute:@"NSOriginalFont" range:NSMakeRange(0, oldTextCopy.length)];
|
|
37
|
+
return [newTextCopy isEqualToAttributedString:oldTextCopy];
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
return [self markdown_textOf:newText equals:oldText];
|
|
@@ -51,7 +51,14 @@
|
|
|
51
51
|
{
|
|
52
52
|
RCTMarkdownUtils *markdownUtils = [self getMarkdownUtils];
|
|
53
53
|
if (markdownUtils != nil) {
|
|
54
|
-
|
|
54
|
+
// Emoji characters are automatically assigned an AppleColorEmoji NSFont and the original font is moved to NSOriginalFont
|
|
55
|
+
// We need to remove these attributes before comparison
|
|
56
|
+
NSMutableAttributedString *newTextCopy = [newText mutableCopy];
|
|
57
|
+
NSMutableAttributedString *oldTextCopy = [oldText mutableCopy];
|
|
58
|
+
[newTextCopy removeAttribute:@"NSFont" range:NSMakeRange(0, newTextCopy.length)];
|
|
59
|
+
[oldTextCopy removeAttribute:@"NSFont" range:NSMakeRange(0, oldTextCopy.length)];
|
|
60
|
+
[oldTextCopy removeAttribute:@"NSOriginalFont" range:NSMakeRange(0, oldTextCopy.length)];
|
|
61
|
+
return [newTextCopy isEqualToAttributedString:oldTextCopy];
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
return [self markdown__textOf:newText equals:oldText];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expensify/react-native-live-markdown",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.107",
|
|
4
4
|
"description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|