@expensify/react-native-live-markdown 0.1.201 → 0.1.202

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.
@@ -58,7 +58,7 @@ public class MarkdownFormatter {
58
58
  private void applyRange(@NonNull SpannableStringBuilder ssb, @NonNull MarkdownRange markdownRange, @NonNull MarkdownStyle markdownStyle) {
59
59
  String type = markdownRange.getType();
60
60
  int start = markdownRange.getStart();
61
- int end = start + markdownRange.getLength();
61
+ int end = markdownRange.getEnd();
62
62
  switch (type) {
63
63
  case "bold":
64
64
  setSpan(ssb, new MarkdownBoldSpan(), start, end);
@@ -5,12 +5,14 @@ import androidx.annotation.NonNull;
5
5
  public class MarkdownRange {
6
6
  private final @NonNull String mType;
7
7
  private final int mStart;
8
+ private final int mEnd;
8
9
  private final int mLength;
9
10
  private final int mDepth;
10
11
 
11
12
  public MarkdownRange(@NonNull String type, int start, int length, int depth) {
12
13
  mType = type;
13
14
  mStart = start;
15
+ mEnd = start + length;
14
16
  mLength = length;
15
17
  mDepth = depth;
16
18
  }
@@ -23,6 +25,10 @@ public class MarkdownRange {
23
25
  return mStart;
24
26
  }
25
27
 
28
+ public int getEnd() {
29
+ return mEnd;
30
+ }
31
+
26
32
  public int getLength() {
27
33
  return mLength;
28
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensify/react-native-live-markdown",
3
- "version": "0.1.201",
3
+ "version": "0.1.202",
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",