Skip to content

Commit

Permalink
Remove import
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Jan 8, 2024
1 parent c90ea1f commit bd535ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ios/RCTMarkdownUtils.mm
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#import <react-native-markdown-text-input/RCTMarkdownUtils.h>
#import <react/debug/react_native_assert.h>
#import <React/RCTAssert.h>
#import <JavaScriptCore/JavaScriptCore.h>
#include <jsi/jsi.h>
#include <hermes/hermes.h>
#include <jsi/jsi.h>

using namespace facebook;

Expand Down Expand Up @@ -50,7 +49,7 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input
auto func = rt.global().getPropertyAsFunction(rt, "parseExpensiMarkToRanges");
auto output = func.call(rt, [inputString UTF8String]);
auto json = rt.global().getPropertyAsObject(rt, "JSON").getPropertyAsFunction(rt, "stringify").call(rt, output).asString(rt).utf8(rt);

NSData *data = [NSData dataWithBytes:json.data() length:json.length()];
NSError *error = nil;
NSArray *ranges = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
Expand Down

0 comments on commit bd535ef

Please sign in to comment.