@expensify/react-native-live-markdown 0.1.164 → 0.1.165
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.
|
@@ -8,8 +8,7 @@ import android.text.style.MetricAffectingSpan;
|
|
|
8
8
|
|
|
9
9
|
import androidx.annotation.NonNull;
|
|
10
10
|
|
|
11
|
-
import com.facebook.react.common.assets.ReactFontManager
|
|
12
|
-
import com.facebook.react.views.text.ReactFontManager;
|
|
11
|
+
import com.facebook.react.common.assets.ReactFontManager;
|
|
13
12
|
|
|
14
13
|
public class MarkdownFontFamilySpan extends MetricAffectingSpan implements MarkdownSpan {
|
|
15
14
|
|
|
@@ -32,12 +31,7 @@ public class MarkdownFontFamilySpan extends MetricAffectingSpan implements Markd
|
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
private void apply(@NonNull TextPaint textPaint) {
|
|
35
|
-
int style = TypefaceStyle.NORMAL;
|
|
36
|
-
if (textPaint.getTypeface() != null) {
|
|
37
|
-
style = textPaint.getTypeface().getStyle();
|
|
38
|
-
} else {
|
|
39
|
-
style = TypefaceStyle.NORMAL;
|
|
40
|
-
}
|
|
34
|
+
int style = textPaint.getTypeface() != null ? textPaint.getTypeface().getStyle() : ReactFontManager.TypefaceStyle.NORMAL;
|
|
41
35
|
Typeface typeface = ReactFontManager.getInstance().getTypeface(mFontFamily, style, mAssetManager);
|
|
42
36
|
textPaint.setTypeface(typeface);
|
|
43
37
|
textPaint.setFlags(textPaint.getFlags() | Paint.SUBPIXEL_TEXT_FLAG);
|
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.165",
|
|
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",
|